#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<int, int>;
using namespace std;
int main() {
  int N;
  cin >> N;
  vector<double> v(N);
  for (int(i) = (0); (i) < (int)(N); ++(i)) cin >> v[i];
  for (int(k) = (0); (k) < (int)(N - 1); ++(k)) {
    vector<double> tmp(N - k - 1, 0);
    for (int i = 0; i < N - k - 1; ++i) {
      tmp[i] = v[i] + v[i + 1];
    }
    double mi = 1e8;
    int idx = 0;
    for (int(i) = (0); (i) < (int)(tmp.size()); ++(i)) {
      if (mi > tmp[i]) {
        mi = tmp[i];
        idx = i;
      }
    }
    int cur = idx, cur2 = idx + 1, n = 0;
    vector<double> v2(N - k - 1);
    for (int(i) = (0); (i) < (int)(v.size()); ++(i)) {
      if (cur == i) {
        v2[n++] = (v[i] + v[i + 1]) / 2.0;
        i++;
        continue;
      }
      v2[n++] = v[i];
    }
    v = v2;
  }
  printf("%.10f\n", v[0]);
}
