#include <bits/stdc++.h>
using namespace std;
using vec = vector<int>;
using intk = int64_t;
int main() {
  int N;
  cin >> N;
  vec v(N);
  for (int i = 0; i < N; i++) cin >> v[i];
  sort(v.begin(), v.end());
  int wa = v[0];
  for (int i = 1; i <= N - 1; i++) {
    wa = (wa + v[i]) / 2;
  }
  cout << wa << endl;
}
