#include <bits/stdc++.h>
using namespace std;
;
const int maxx = 100009;
void solve() {
  int n;
  cin >> n;
  vector<int> arr(n);
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  if (n == 0) {
    cout << 0 << "\n";
    return;
  }
  sort(arr.begin(), arr.end());
  int sum = arr[0];
  for (int i = 1; i < n; i++) {
    sum = (sum + arr[i]) / 2;
  }
  cout << sum << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int t = 1;
  while (t-- > 0) {
    solve();
  }
  return 0;
}
