#include <bits/stdc++.h>   using namespace std;   int main() {     ios_base::sync_with_stdio(false);     int n;     cin >> n;     vector<int> v(n);     for (int i = (int)(0); i < (int)(n); ++i) cin >> v[i];     sort(v.begin(), v.end());     cout << v[(n - 1) / 2] << endl;     return 0;   }   