#include <bits/stdc++.h>
using namespace std;
int a[1005];
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  while (cin >> n) {
    memset((a), 0, sizeof((a)));
    for (int i = 1; i <= n; ++i) cin >> a[i];
    sort(a + 1, a + n + 1);
    int l = 1, r = n;
    while (1) {
      if (r - l == 2) break;
      --r;
      if (r - l == 2) break;
      ++l;
    }
    cout << a[l + 1] << endl;
  }
}
