#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) int main(){ cin.tie(nullptr); ios_base::sync_with_stdio(false); int n; cin >> n; vector a(n); rep(i,n) cin >> a[i]; sort(a.begin(),a.end()); if(n%2 == 1) cout << a[n/2] << endl; else cout << (a[n/2]+a[n/2-1])/2 << endl; return 0; }