#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T gcd(T a, T b) {
  while (b) b ^= a ^= b ^= a %= b;
  return a;
}
template <class T>
inline T mod(T x) {
  if (x < 0)
    return -x;
  else
    return x;
}
const int MOD = 1e9 + 7;
const int INF = 1e9;
int main() {
  long long n;
  cin >> n;
  long long sum = 0;
  long long a[n];
  for (__typeof(0) i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  sum += a[0];
  for (__typeof(1) i = 1; i < n; i++) sum = (sum + a[i]) / 2;
  cout << sum;
  return 0;
}
