#include <iostream>
#include <vector>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  vector<int> v;
  for (int i = 0; i < N; i++) {
    int V;
    cin >> V;
    v.push_back(V);
  }
  
  while (v.size() != 1) {
    vector<int> v2;
    sort(v.begin(), v.end());
    int res = 0;
    for (int i = 0; i < v.size()/2; i++) {
      v2.push_back((v[i] + v[v.size() - 1 - i]) / 2);
    }
    v = v2;
  }
  cout << res << endl;
}