#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
long long n = 0, a[MAXN], BIT[MAXN];
long long largest(long long a, long long b) { return (a < b) ? b : a; }
int smallest(long long a, long long b) {
  if (a < b) return a;
  return b;
}
int main() {
  int n = 0;
  cin >> n;
  vector<float> a(n);
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  if (n == 2) {
    cout << (a[0] + a[1]) / 2 << endl;
    return 0;
  }
  sort(a.rbegin(), a.rend());
  float s = (a[2] + a[1]) / 2;
  cout << (s + a[0]) / 2 << endl;
  return 0;
}
