#include <bits/stdc++.h>
using namespace std;
using vi = vector<int>;
using vs = vector<string>;
using vc = vector<char>;
using ll = long long;
using vvl = vector<vector<ll> >;
using vd = vector<double>;
ll a = 0, b = 0, c = 0, e = 0, n = 0, k = 0;
int main() {
  cin >> n;
  vd v(n);
  for (int i = 0; i < n; i++) cin >> v[i];
  (v.rbegin(), v.rend());
  for (int i = 0; i < n - 1; i++) {
    v[n - i - 2] = (v[n - i - 1] + v[n - i - 2]) / 2;
  }
  cout << v[0] << endl;
  ;
}
