#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  double a, b, c = 0, sum = 0;
  vector<double> v;
  cin >> a;
  for (int i = 0; i < a; i++) {
    cin >> b;
    v.push_back(b);
  }
  if (v.size() <= 2) {
    if (v.size() == 1) {
      cout << v[0] << endl;
    } else {
      cout << (v[0] + v[1]) / 2.0 << endl;
    }
  } else {
    sum = v[v.size() - 1] + v[v.size() - 2];
    sum = sum / 2.0;
    cout << (v[v.size() - 3] + sum) / 2.0 << endl;
  }
}
