#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a;
  cin >> n;
  priority_queue<int, vector<int>, greater<int>> pq;
  for (int i = 0; i < n; i++) {
    cin >> a;
    pq.push(a);
  }
  while (pq.size() != 1) {
    int x, y, z;
    x = pq.top();
    pq.pop();
    y = pq.top();
    pq.pop();
    z = (x + y) / 2;
    pq.push(z);
  }
  int ans = pq.top();
  pq.pop();
  cout << ans << endl;
  return 0;
}
