#include <bits/stdc++.h>
using namespace std;
double cnt(vector<double> p, int i, int j) {
  double re;
  int len = p.size();
  if (len == 2) {
    re = (p[i] + p[j]) / 2;
  } else {
    double a = (p[i] + p[j]) / 2;
    swap(p[0], p[i]);
    swap(p[len - 1], p[j]);
    p[0] = a;
    p.pop_back();
    len--;
    for (int k = 0; k < len - 1; k++) {
      for (int l = k + 1; l < len; l++) {
        a = cnt(p, k, l);
        if (re < a) {
          re = a;
        }
      }
    }
  }
  return re;
}
int main() {
  int n;
  scanf("%d", &n);
  vector<double> value;
  double v;
  for (int i = 0; i < n; i++) {
    scanf("%lf", &v);
    value.push_back(v);
  }
  double max = 0, m = 0;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      m = cnt(value, i, j);
      if (max < m) {
        max = m;
      }
    }
  }
  printf("%.5lf", max);
  return 0;
}
