#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, i, j, k;
  double x, y, z;
  cin >> n;
  int a[n];
  long long b[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n, greater<int>());
  if (n > 2) {
    x = (a[n - 1] + a[n - 2]) / 2.0;
    y = (x + (a[0] * 1.0)) / 2.0;
    cout << y << endl;
  } else {
    cout << (a[0] + a[1]) / 2.0;
  }
}
