#include <bits/stdc++.h>
using namespace std;
double func(vector<double> A) {
  int l = A.size();
  if (l == 2) {
    return (A[0] + A[1]) / 2.0;
  }
  double maxi = 0;
  for (int i = 0; i < l - 1; i++) {
    for (int j = i + 1; j < l; j++) {
      vector<double> B = A;
      B.erase(B.begin() + j);
      B.erase(B.begin() + i);
      B.push_back((A[i] + A[j]) / 2.0);
      maxi = max(maxi, func(B));
    }
  }
  return maxi;
}
int main() {
  int N;
  cin >> N;
  vector<double> v(N);
  for (int i = 0; i < N; i++) {
    cin >> v[i];
  }
  cout << func(v) << endl;
}
