#include <bits/stdc++.h>
using namespace std;
priority_queue<int, vector<int>, greater<int> > p;
int main() {
  int n;
  cin >> n;
  for (long long i = 1; i <= n; ++i) {
    int x;
    cin >> x;
    p.push(x);
  }
  while (!p.empty() && p.size() >= 2) {
    int a = p.top();
    p.pop();
    int b = p.top();
    p.pop();
    p.push((a + b) / 2);
  }
  cout << p.top();
}
