#include <cstdio>
#include <algorithm>
#include <vector>
// #include <bits/stdc++.h>
using namespace std;
int main() {
int N;
scanf("%d", &N);
vector<int> v(N);
for (int n = 0; n < N; n++) {
scanf("%d", &v[n]);
}
sort(v.begin(), v.end());
for (int i = 1; i < N; i++) {
v[i] = (v[i] + v[i - 1]) / 2;
// printf("%f\n", arr[i]);
}
printf("%d\n", v[N - 1]);
return 0;
}
/*
Sample Input:
8
10 15 12 3 4 13 1 15
Sample Output:
14
*/