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