#include <bits/stdc++.h>
int abs(int a) {
  if (a < 0) {
    a = -1 * a;
  }
  return a;
}
void merge(int* arr, int l, int m, int h) {
  int s1 = m - l + 1, s2 = h - m;
  int a1[s1], a2[s2], i, j, k;
  for (i = 0; i < s1; i++) {
    a1[i] = arr[i + l];
  }
  for (j = 0; j < s2; j++) {
    a2[j] = arr[j + m + 1];
  }
  i = 0;
  j = 0;
  k = l;
  while (i < s1 && j < s2) {
    if (a1[i] < a2[j]) {
      arr[k] = a1[i];
      i++;
    } else {
      arr[k] = a2[j];
      j++;
    }
    k++;
  }
  while (i < s1) {
    arr[k] = a1[i];
    i++;
    k++;
  }
  while (j < s2) {
    arr[k] = a2[j];
    j++;
    k++;
  }
  return;
}
void mergeSort(int* arr, int l, int h) {
  if (l < h) {
    int m = l + (h - l) / 2;
    mergeSort(arr, l, m);
    mergeSort(arr, m + 1, h);
    merge(arr, l, m, h);
  }
  return;
}
int main(void) {
  int n;
  scanf("%d", &n);
  int x[n], i;
  for (i = 0; i < n; i++) {
    scanf("%d", &x[i]);
  }
  mergeSort(x, 0, n - 1);
  if (n % 2 == 1) {
    printf("%d\n", x[n / 2]);
  } else {
    int p1 = n / 2 - 1, p2 = n / 2;
    long int sum1 = 0, sum2 = 0;
    for (i = 0; i < n; i++) {
      sum1 = (long int)sum1 + abs(x[p1] - x[i]);
      sum2 = (long int)sum2 + abs(x[p2] - x[i]);
    }
    if (sum1 <= sum2) {
      printf("%d\n", x[p1]);
    } else {
      printf("%d\n", x[p2]);
    }
  }
  return 0;
}
