#include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
const int MOD = 1e9 + 7;
const int INF = 1e9;
int main() {
  int N;
  cin >> N;
  vector<long long> v(N);
  for (int i = 0; i < int(N); ++i) cin >> v[i];
  sort((v).begin(), (v).end());
  long long ans = v[0];
  for (int i = 1; i < int(N); ++i) {
    ans = (ans + v[i]) / 2;
  }
  cout << ans << endl;
}
