#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> ing;
  for (int i = 0; i < n; ++i) {
    int v;
    cin >> v;
    ing.push_back(v);
  }
  sort(ing.begin(), ing.end());
  double res;
  res = ing[ing.size() - 1] + ing[ing.size() - 2];
  cout << res / 2.0 << endl;
}
