#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e18;
const long long cs = 200005;
const long long mod = 1000000007;
const double PI = 2 * acos(0.0);
void solve() {
  long long t, n, m, a, b, i, j, k, x, y, cnt = 1;
  bool flag = false;
  cin >> n;
  vector<long long> v(n);
  for (auto &ss : v) cin >> ss;
  sort(v.begin(), v.end());
  if (n == 2) {
    cout << (v[0] + v[1]) / 2.0 << '\n';
  } else {
    cout << (v[n - 1] / 2.0) + (v[n - 2] + v[n - 3]) / 4.0 << '\n';
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  return 0;
}
