#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 100;
const int mod = 1e9 + 7;
const int inf = 0x3f3f3f3f;
int book[1000];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> book[i];
  double ans = book[n - 1] + book[n - 2];
  cout << fixed << setprecision(8) << ans / 2 << '\n';
  return 0;
}
