#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  float a[n];
  float mm[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < n; i++) {
    float z = (float)((a[i % n] + a[(i + 1) % n]) / 2);
    float in = (float)((a[(i + 2) % n] + z) / 2);
    mm[i] = in;
  }
  cout << fixed << setprecision(1) << (*max_element(mm, mm + n));
}
