#include <iostream>
#include <algorithm>
using namespace std;
long long n, a[300005];
int main(){
cin >> n;
for (int i = 1; i <= n; i++){
cin >> a[i];
}
sort(a+1, a+n+1);
cout << a[(n+1)/2];
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmxvbmcgbG9uZyBuLCBhWzMwMDAwNV07CgppbnQgbWFpbigpewoJY2luID4+IG47Cglmb3IgKGludCBpID0gMTsgaSA8PSBuOyBpKyspewoJCWNpbiA+PiBhW2ldOwoJfQoJc29ydChhKzEsIGErbisxKTsKCWNvdXQgPDwgYVsobisxKS8yXTsKCXJldHVybiAwOwp9