#include <bits/stdc++.h>
using namespace std;
int a[10000];
bool cmp(int a, int b) {
  if (a > b) return true;
  return false;
}
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  double maxn = 0;
  sort(a, a + n, cmp);
  int a1 = a[0];
  int a2 = a[1];
  int a3 = a[2];
  double ans1 = (a2 + a3) * 1.0 / 2;
  double ans2 = (ans1 + a1) * 1.0 / 2;
  if (n > 2) {
    cout << ans2 << endl;
  } else {
    cout << (a1 + a2) * 1.0 / 2 << endl;
  }
  return 0;
}
