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