#include<stdio.h>
int comparision(int N,int arr1[],int arr2[])
{
int arr3[2*N]; //compare to get the result
int i=0,j=0,k=0;
while(i<N&&j<N)
{
if(arr1[i]<=arr2[j])
arr3[k++]=arr1[i++];
else { //add one and two into the new list
arr3[k++]=arr2[j++];
}
}
while(i<N) //add the rest
{
arr3[k++]=arr1[i++];
}
while(j<N)
{
arr3[k++]=arr2[j++]; //add the rest
}
int middle=(2*N-1)/2;
int result=arr3[middle]; //get the middle
return result;
}
int main()
{
int N; //input and output
scanf("%d",&N);
int a[N];
int b[N];
for(int i=0;i<N;i++)
{
scanf("%d",&a[i]);
}
for(int i=0;i<N;i++)
{
scanf("%d",&b[i]);
}
int middle=comparision(N,a,b); //use the function
printf("%d",middle);
return 0;
}