#include <bits/stdc++.h>
using namespace std;
double ans = 0;
void dfs(vector<double> a) {
  if (a.size() == 1) ans = max(ans, a[0]);
  for (int i = 0; i < a.size() - 1; ++i) {
    vector<double> b;
    for (int l = 0; l < a.size(); ++l) {
      if (l == i) {
        b.push_back((a[l] + a[l + 1]) / 2.0);
        ++l;
      } else {
        b.push_back(a[l]);
      }
    }
    dfs(b);
  }
}
int main() {
  int n;
  cin >> n;
  vector<double> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  dfs(a);
  cout << ans << endl;
}
