#include <bits/stdc++.h>
void sort(int a[], int left, int right) {
  if (left > right) return;
  int i = left;
  int j = right;
  int temp = a[left];
  while (i != j) {
    while (a[j] >= temp && i < j) j--;
    while (a[i] <= temp && i < j) i++;
    int t = a[i];
    a[i] = a[j];
    a[j] = t;
  }
  int t = a[left];
  a[left] = a[i];
  a[i] = t;
  sort(a, left, i - 1);
  sort(a, i + 1, right);
}
int main() {
  int n;
  while (~scanf("%d", &n)) {
    int a[1005];
    for (int i = 0; i < n; i++) {
      scanf("%d", a + i);
    }
    sort(a, 0, n - 1);
    int i = 0, j = n - 1;
    while (i != j) {
      j--;
      if (i == j) break;
      i++;
    }
    printf("%d\n", a[i]);
  }
}
