#include <bits/stdc++.h>
using namespace std;
double ans = -1;
double dfs(vector<double> now) {
  if ((int)now.size() == 2) {
    ans = max(ans, (now[0] + now[1]) / 2);
  } else {
    for (int i = 0; i < (int)now.size(); i++) {
      for (int j = i + 1; j < (int)now.size(); j++) {
        vector<double> next = now;
        next.erase(next.begin() + i);
        next.erase(next.begin() + j - 1);
        next.push_back((now[i] + now[j]) / 2);
        max(ans, dfs(next));
      }
    }
  }
  return ans;
}
int main() {
  int N;
  cin >> N;
  vector<double> v(N, 0);
  for (int i = 0; i < (N); ++i) {
    cin >> v[i];
  }
  cout << dfs(v) << endl;
  return 0;
}
