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