#include <bits/stdc++.h>
using ll = long long;
using namespace std;
ll n, e;
priority_queue<ll, std::vector<ll>, greater<ll>> q;
int main() {
  cin >> n;
  for (ll i = 0; i < n; i++) {
    cin >> e;
    q.push(e);
  }
  for (ll i = 0; i < n - 1; i++) {
    auto e1 = q.top();
    q.pop();
    auto e2 = q.top();
    q.pop();
    ll newe = (e1 + e2) / 2;
    q.push(newe);
  }
  cout << q.top() << endl;
}
