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


int main(){
    long n, a[100000], i; cin >> n;
    long 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 <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <bits/stdc++.h>

using namespace __gnu_pbds;
using namespace std;

using ll = long long;
using ld = long double;

typedef tree<
        int,
        null_type,
        less<int>,
        rb_tree_tag,
        tree_order_statistics_node_update>
        ordered_set;

#define mp make_pair


int MOD =  1e9 + 7;



int mul(int a, int b) {
    return (1LL * a * b) % MOD;
}

int add(int a, int b) {
    int s = (a+b);
    if (s>=MOD) s-=MOD;
    return s;
}

int sub(int a, int b) {
    int s = (a+MOD-b);
    if (s>=MOD) s-=MOD;
    return s;
}

int po(int a, ll deg)
{
    if (deg==0) return 1;
    if (deg%2==1) return mul(a, po(a, deg-1));
    int t = po(a, deg/2);
    return mul(t, t);
}

int inv(int n)
{
    return po(n, MOD-2);
}


mt19937 rnd(time(0));

/*
const int LIM = 1000;

vector<int> facs(LIM), invfacs(LIM);

void init()
{
    facs[0] = 1;
    for (int i = 1; i<LIM; i++) facs[i] = mul(facs[i-1], i);
    invfacs[LIM-1] = inv(facs[LIM-1]);
    for (int i = LIM-2; i>=0; i--) invfacs[i] = mul(invfacs[i+1], i+1);
}

int C(int n, int k)
{
    if (n<k) return 0;
    if (n<0 || k<0) return 0;
    return mul(facs[n], mul(invfacs[k], invfacs[n-k]));
}*/


/*struct DSU
{
    vector<int> sz;
    vector<int> parent;
    void make_set(int v) {
        parent[v] = v;
        sz[v] = 1;
    }

    int find_set(int v) {
        if (v == parent[v])
            return v;
        return find_set(parent[v]);
    }

    void union_sets(int a, int b) {
        a = find_set(a);
        b = find_set(b);

        if (a != b) {
            if (sz[a] < sz[b])
                swap(a, b);
            parent[b] = a;
            sz[a] += sz[b];
        }
    }

    DSU (int n)
    {
        parent.resize(n);
        sz.resize(n);
        for (int i = 0; i<n; i++) make_set(i);
    }
};*/

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(nullptr);

    int n; cin>>n;
    vector<int> a(n); for (int i = 0; i<n; i++) cin>>a[i];

    sort(a.begin(), a.end());

    ld ans = 1e18;

    ld cur = 0;
    ld tmp = 0; for (auto it: a) tmp+=it;

    ans = min(ans, tmp);


    for (int i = 0; i<n; i++)
    {
        ld cur1 = (ld)a[i]/(ld)(2);
        tmp+=(cur1-cur)*n;
        tmp-=2*(cur1-cur)*(n-i);
        cur = cur1;
        ans = min(ans, tmp);
    }

    cout<<setprecision(10)<<fixed<<ans/(ld)(n);
}
