#include #include #include using namespace std; int main(int argc, char const* argv[]) { int N; cin >> N; vector A(N); for (int i = 0; i < N; i++) { cin >> A[i]; } sort(A.begin(), A.end()); if (N % 2 == 0) { cout << (A[N/2] + A[N/2-1]) * 0.5 << endl; } else { cout << A[N/2] << endl; } return 0; }