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