#include <bits/stdc++.h>
const int mx = 1e6 + 5;
const int inf = 0x3f3f3f3f;
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  scanf("%d", &n);
  vector<long long int> v(n);
  for (int i = 0; i < n; ++i) scanf("%lld", &v[i]);
  sort(v.begin(), v.end());
  if (n % 2) {
    printf("%lld\n", v[n / 2]);
  } else {
    long long int sum1 = 0, sum2 = 0;
    int v1 = v[n / 2 - 1], v2 = v[n / 2], x;
    for (int i = 0; i < n; ++i) {
      if (i != n / 2 - 1) sum1 += abs(v1 - v[i]);
      if (i != n / 2) sum2 += abs(v[i] - v2);
    }
    if (sum1 <= sum2)
      x = v1;
    else
      x = v2;
    printf("%d\n", x);
  }
  return 0;
}
