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