#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  double a[10001];
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  double maxi = -1;
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++) {
      double adj = (a[i] + a[j]) / 2.0;
      for (int k = 0; k < n; k++)
        if (k != i && k != j) adj = (adj + a[k]) / 2.0;
      maxi = max(maxi, adj);
    }
  cout << maxi;
  return 0;
}
