#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  float a[100000];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  float ans = 0;
  if (n == 2) {
    cout << (a[0] + a[1]) / 2;
    return 0;
  } else {
    float b = 0, c = 0;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < n; j++) {
        if (j == i) continue;
        b = (a[j] + a[i]) / 2;
        for (int k = 0; k < n; k++) {
          if (k == i) continue;
          if (k == j) continue;
          c = (b + a[k]) / 2;
          if (c >= ans) {
            ans = c;
          }
        }
      }
    }
  }
  cout << ans;
  return 0;
}
