#include<bits/stdc++.h>
using namespace std;


int main(){
    long n, a[100000], i; cin >> n;
    double dn = n, x2 = 2;
    for(i = 0; i < n; i++) cin >> a[i];

    if(n == 1) cout << fixed << setprecision(15)
                    << a[0] / x2 << endl;
    else if(n == 2) cout << fixed << setprecision(15)
                         << max(a[0], a[1]) / x2 << endl;
    else{
        sort(a, a + n);
        long hsum = 0; x2 = a[int(n / 2)] / x2;
        for(i = n / 2; i < n; i++) hsum += a[i];
        
        if(n % 2 == 0){
            cout << fixed << setprecision(15)
                 << hsum / dn << endl;
        }
        else{
            cout << fixed << setprecision(15)
                 << x2 + (hsum - int((n + 1)/ 2) * a[int(n / 2)]) / dn << endl;
        }
    }
    return 0;
}
#include <bits/stdc++.h>
// #include <atcoder/all>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define srep(i, s, t) for (int i = s; i < t; ++i)
#define drep(i, n) for (int i = (n)-1; i >= 0; --i)
using namespace std;
// using namespace atcoder;
typedef long long int ll;
typedef pair<int, int> P;
#define MAX_N 200005

int main() {
    int n;
    cin >> n;
    double a[n];
    double sum = 0;
    rep(i, n) {
        cin >> a[i];
        sum += a[i];
    }
    sort(a, a + n);
    double ans = sum / n;

    rep(i, n) {
        sum -= a[i];
        double tmp = sum - a[i] * (n - 1 - i) + a[i] * n / 2;
        tmp /= n;
        ans = min(ans, tmp);
    }

    cout << fixed << setprecision(10) << ans << endl;
    return 0;
}
