#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, v[1010];
  cin >> N;
  for (int i = 1; i <= N; i++) {
    cin >> v[i];
  }
  long double c[1010];
  for (int i = 1; i <= N - 1; i++) {
    for (int j = i + 1; j <= N; j++) {
      c[i] = ((double)v[i] + (double)v[j]) / 2;
      if (N > 2) {
        for (int k = 1; k <= N; k++) {
          if (k != i && k != j) {
            c[i] = (c[i] + (double)v[k]) / 2;
          }
        }
      }
    }
  }
  long double max = c[1];
  for (int i = 1; i <= N - 1; i++) {
    if (c[i] > max) max = c[i];
  }
  cout << max << endl;
  return 0;
}
