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