#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  int a[100];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  double ans = 0;
  double ans1 = -1e8;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      ans = (double)(a[i] + a[j]) / 2;
      for (int k = 0; k < n; k++) {
        if (a[k] != a[j] && a[k] != a[i]) {
          ans1 = max(ans1, (double)(ans + a[k]) / 2);
        }
      }
    }
  }
  if (ans1 == -1e8) {
    int sum = 0;
    double ans2;
    for (int i = 0; i < n; i++) {
      sum = sum + a[i];
    }
    ans2 = (double)sum / n;
    cout << ans2 << endl;
    return 0;
  }
  cout << ans1 << endl;
  return 0;
}
