#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];
  }
  if (N == 2) {
    cout << ((double)(v[0] + v[1]) / 2) << endl;
  } else {
    double c[1010];
    double d[1010];
    for (int i = 0; i < N - 1; i++) {
      for (int j = i + 1; j < N; j++) {
        c[i] = (double)(v[i] + v[j]) / 2;
        for (int k = 0; k < N; k++) {
          if (k != i && k != j) {
            d[i] = (double)(c[i] + v[k]) / 2;
          }
        }
      }
    }
    double max = d[0];
    for (int i = 1; i < N; i++) {
      if (d[i] > max) max = d[i];
    }
    cout << max << endl;
  }
  return 0;
}
