#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  double v[n];
  for (int i = 0; i < n; i++) {
    cin >> v[i];
  }
  double adv = 0;
  double ans = 0;
  for (int i = 0; i < n - 1; i++) {
    adv = (v[i] + v[i + 1]) / 2;
    if (ans < adv) {
      ans = adv;
    }
  }
  cout << setprecision(6) << scientific << ans << endl;
  return 0;
}
