#include using namespace std; int main() { int N, tmp; cin >> N; int A[N]; for(int i = 0; i < N; i++){ cin >> A[i]; } for(int i = 0; i < N; i++){ for(int j = i + 1; j < N; j++){ if(A[i] > A[j]){ tmp = A[i]; A[i] = A[j]; A[j] = tmp; } } } if(N % 2 == 0){ cout << (A[N/2-1] + A[N/2]) / 2 << endl; }else{ cout << A[N-1/2] << endl; } return 0; }