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