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