#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n;
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; i++) cin >> a[i];
  long double ans = 0.0;
  for (long long int i = 0; i < (n - 1); i++) {
    long double y = (long double)a[i];
    for (long long int j = i + 1; j < n; j++) {
      long double r = (long double)a[j];
      long double sum = (y + r) / 2.0;
      for (long long int k = 0; k < n; k++) {
        if (a[k] != a[i] && a[k] != a[j]) {
          long double b = (long double)a[k];
          sum = (sum + b) / 2.0;
        }
      }
      ans = max(ans, sum);
    }
  }
  cout << fixed << setprecision(15) << ans << endl;
  return 0;
}
