#include<bits/stdc++.h>
using namespace std;
const int N = 2e5 + 9;

int n, a[N], m, b[N];

bool Judge () {
	int l = n, r = n;
	while (l > 1 && b[l - 1] ^ b[l]) --l;
	while (r < m && b[r] ^ b[r + 1]) ++r;
	int x = min(n - l, r - n);
	return b[n] ^ (x & 1);
}

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