#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i;
  cin >> n;
  long double arr[n];
  long double ans = 0.0;
  for (i = 0; i < n; i++) {
    cin >> arr[i];
  }
  if (n == 2) {
    ans = (arr[0] + arr[1]) / 2;
  } else {
    sort(arr, arr + n, greater<long double>());
    ans = (arr[2] + arr[1]) / 2;
    ans += arr[0];
    ans = ans / 2;
  }
  printf("%.6llf\n", ans);
  return 0;
}
