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