#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> vec(n);
  for (int i = 0; i < (n); ++i) cin >> vec[i];
  sort(vec.rbegin(), vec.rend());
  for (int i = 0; i < (n - 1); ++i) {
    vec[0] = (vec[0] + vec[i + 1]) / 2;
  }
  cout << vec[0] << endl;
}
