#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  double gu;
  cin >> N;
  int a[N];
  for (int i = 0; i < N; i++) {
    cin >> a[i];
  }
  sort(a, a + N, greater<int>());
  cout << (a[0] + a[1]) / 2.0 << endl;
}
