#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t;
  t = 1;
  while (t--) {
    long long int n;
    cin >> n;
    long long int a[n], b[n];
    for (long long int i = 0; i < n; i++) cin >> a[i];
    sort(a, a + n);
    long long int ans = a[0];
    for (long long int i = 1; i < n; i++) {
      ans = (a[i] + ans) / 2;
    }
    cout << ans << endl;
  }
}
