#include using namespace std; int main(){ int N; cin >> N; vector a(N); for(int i = 0; i < N; i++){ cin >> a.at(i); } sort(a.begin(), a.end()); if(N%2 == 0){ cout << (a.at(N/2) + a.at(N/2 - 1))/2; }else{ cout << a.at(N/2); } }