#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);
  }
  double M = 0, j = 0;
  for (int i = 0; i < N; i++) {
    if (v.at(i) >= M) {
      M = v.at(i);
      j = i;
    }
  }
  double S = 0;
  for (int i = 0; i < N; i++) {
    if (i != j) {
      S += v.at(i);
    }
  }
  S /= N - 1;
  double ans = (S + M) / 2;
  cout << ans << endl;
}
