#include <bits/stdc++.h>
using namespace std;
void solve();
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  solve();
  return 0;
}
long double w[100];
void solve() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> w[i];
  long double m = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (i != j) {
        long double s = (w[i] + w[j]) / 2;
        for (int l = 1; l <= n; l++) {
          if (l != i && l != j) {
            m = max(m, (s + w[l]) / 2);
          }
        }
      }
    }
  }
  if (m == 0) {
    m = (w[1] + w[2]) / 2;
  }
  cout << fixed << setprecision(5) << m;
}
