#include <bits/stdc++.h>
using namespace std;
vector<double> a, b;
int main() {
  int n;
  cin >> n;
  for (int i = 0, aux; i < n; ++i) {
    cin >> aux;
    a.push_back(aux);
  }
  for (int it = n; it > 1; --it) {
    double best = a[0] + a[1];
    int pos = 0;
    assert((int)a.size() == it);
    for (int i = 0; i + 1 < a.size(); ++i) {
      if (a[i] + a[i + 1] < best) {
        best = a[i] + a[i + 1];
        pos = i;
      }
    }
    b.clear();
    for (int i = 0; i < a.size(); ++i) {
      if (i != pos && i != pos + 1) {
        b.push_back(a[i]);
      } else if (i == pos) {
        b.push_back((a[pos] + a[pos + 1]) / 2.0);
      }
    }
    a = b;
  }
  printf("%.10f\n", a[0]);
  return 0;
}
