#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<double> A(n);
  for (int i = 0; i < n; i++) {
    cin >> A[i];
  }
  sort(A.rbegin(), A.rend());
  double ans = (A[0] + A[1]) / 2;
  printf("%f\n", ans);
}
