#include using namespace std; int main() { int n, b, ans; vector a; cin >> n; for (int i = 0; i < n; i++) { cin >> b; a.push_back(b); } sort(a.begin(), a.end()); if (n % 2 == 0) { cout << (a[n / 2 - 1] + a[n / 2]) / 2 << endl; } else { cout << a[n / 2] << endl; } }