#include <bits/stdc++.h>
using namespace std;
int main() {
  priority_queue<double, vector<double>, greater<double> > q;
  int n;
  cin >> n;
  double tot;
  for (int i = 1; i <= n; i++) {
    int v;
    cin >> v;
    tot += v;
    q.push(v);
    if (i % 2 == 0) {
      q.pop();
      q.pop();
      tot /= 2.0;
      q.push(tot);
    }
  }
  double a = q.top();
  q.pop();
  double b = q.top();
  cout << (a + b) / 2.0 << endl;
  return 0;
}
