#include <cstdio>
int N, L, a[200000];
int check(int x)
{
	int l = N, r = N;
	while (l > 1 && (a[l - 1] >= x) != (a[l] >= x))
		l--;
	while (r < L && (a[r + 1] >= x) != (a[r] >= x))
		r++;
	if (l == 1 && r == L)
		return (a[N] >= x) ^ (N - 1 & 1);
	if (l == 1)
		return a[r] >= x;
	if (r == L)
		return a[l] >= x;
	if ((a[l] >= x) == (a[r] >= x))
		return a[l] >= x;
	return a[N <= l + r >> 1 ? l : r] >= x;
}
int main()
{
	scanf("%d", &N);
	L = N + N - 1;
	for (int i = 1; i <= L; i++)
		scanf("%d", a + i);
	int l = 1, r = L;
	while (l < r)
	{
		int m = l + r + 1 >> 1;
		if (check(m))
			l = m;
		else
			r = m - 1;
	}
	printf("%d\n", l);
	return 0;
}
