简单

#include<iostream>
#include<string>
#include<algorithm>
#define MAX 10000
using namespace std;
int a[MAX + 1];

int main() {
	int N;
	while (cin >> N) {
		if (N == 0)return 0;

		for (int i = 0; i < N; i++)cin >> a[i];
		sort(a, a + N);
		if (N % 2 == 1) {
			cout << a[N / 2] << endl;
		}
		else {
			cout << (a[N / 2] + a[N / 2 - 1]) / 2 << endl;
		}
	}
	
	
	return 0;
}