#include <bits/stdc++.h>
using namespace std;
const int N = 10;
int n;
long long res;
priority_queue<int, vector<int>, greater<int> > heap;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    heap.push(x);
  }
  while (heap.size() > 1) {
    int a = heap.top();
    heap.pop();
    int b = heap.top();
    heap.pop();
    heap.push((a + b) / 2);
  }
  cout << heap.top() << endl;
  return 0;
}
