#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int a, b, c, i, j;
  cin >> a;
  double p[a];
  for (i = 0; i < a; i++) {
    cin >> p[i];
  }
  for (i = 0; i < a - 1; i++) {
    double q = 3000;
    c = 0;
    for (j = 0; j < a - 1 - i; j++) {
      if (q * 2 > p[j] + p[j + 1]) {
        q = (p[j] + p[j + 1]) / 2;
        c = j;
      }
    }
    for (j = c; j < a; j++) {
      if (j == c)
        p[j] = q;
      else if (j != a - 1)
        p[j] = p[j + 1];
      else
        p[j] = 0;
    }
  }
  cout << setprecision(6) << p[0] << endl;
}
