#include <bits/stdc++.h>
using namespace std;
float sum = 0, t = 0;
int main() {
  bool f = true;
  int a;
  cin >> a;
  unsigned long long b[1005];
  for (int i = 0; i < a; i++) {
    cin >> b[i];
  }
  for (int i = 0; i < a - 1; i++) {
    for (int j = i + 1; j < a; j++) {
      sum = (b[i] + b[j]) / 2.0;
      for (int k = 0; k < a; k++) {
        if (k != i && k != j) {
          sum = (sum + b[k]) / 2.0;
        }
      }
      if (f) {
        t = sum;
      } else {
        if (sum > t) t = sum;
      }
    }
  }
  cout << t;
}
