#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<double> v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  vector<double> sum(n);
  for (int i = 0; i < n; i++) {
    sum[i] = v[i];
    for (int j = i + 1; j < n; j++) {
      sum[i] = (sum[i] + (double)v[j]) / 2.0;
    }
    for (int j = 0; j < i; j++) {
      if (i != j) {
        sum[i] = (sum[i] + (double)v[j]) / 2.0;
      }
    }
  }
  double ans = 0.0;
  for (int i = 0; i < n; i++) {
    ans = max(ans, sum[i]);
  }
  cout << fixed;
  cout << setprecision(6) << ans << endl;
  return 0;
}
