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