#include<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<cstdlib>
#include<cstring>
using namespace std;

const int N=200005;

int n,l,r,mid,m;
int a[N],b[N];

bool check(int w){
	int i,l,r;
	for (i=1;i<=m;i++) b[i]=(a[i]>w);
	l=r=n;
	while (l>1&&b[l]!=b[l-1]) l--;
	while (r<m&&b[r]!=b[r+1]) r++;
	if (m-r+1>=l) return b[r];
	return b[l];
}

int main(){
	int i;
	scanf("%d",&n); m=n+n-1;
	for (i=1;i<=m;i++) scanf("%d",&a[i]);
	l=1; r=m;
	while (l<r){
		mid=l+(r-l)/2;
		if (check(mid)) l=mid+1;
		else r=mid;
	}
	printf("%d\n",r);
	return 0;
}