#include <bits/stdc++.h>
using namespace std;
bool comp(float a, float b) { return (a < b); }
int main() {
  int n;
  cin >> n;
  float index[10];
  int arr[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  float b = (arr[0] + arr[1]) / 2.0;
  for (int i = 2; i < n; i++) {
    b = (b + arr[i]) / 2.0;
  }
  index[0] = (float)b;
  float c = (arr[n - 1] + arr[n - 2]) / 2.0;
  for (int i = n - 3; i >= 0; i--) {
    c = (c + arr[i]) / 2.0;
  }
  index[1] = (float)c;
  float* i1;
  i1 = max_element(index, index + 9, comp);
  cout << *i1 << "\n";
  return 0;
}
