#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vl = vector<ll>;
using _loop_int = int;
const ll MOD = 1000000007ll;
int N, i;
double maxC = 0;
vector<double>::iterator itInc(vector<double>::iterator it, int j) {
  for (; j > 0; j--) {
    it++;
  }
  return it;
}
double solve(vector<double> v) {
  if (v.size() == 1) {
    return v[0];
  }
  int j = 0;
  for (auto n : v) {
    vector<double> v2(v.size());
    copy((v).begin(), (v).end(), v2.begin());
    v2.erase(itInc(v2.begin(), j));
    j++;
    int k = 0;
    for (auto n2 : v2) {
      vector<double> v3(v2.size());
      copy((v2).begin(), (v2).end(), v3.begin());
      v3.erase(itInc(v3.begin(), k));
      k++;
      v3.push_back((n + n2) / 2.0);
      double r = solve(v3);
      if (r > maxC) {
        maxC = r;
      }
    }
  }
}
int main() {
  scanf("%d", &N);
  vector<double> v;
  double d;
  for (_loop_int i = 0; i < (_loop_int)(N); i++) {
    scanf("%lf", &d);
    v.push_back(d);
  }
  solve(v);
  printf("%lf", maxC);
  return 0;
}
