#include <cstdio>
#include <algorithm>
using namespace std;
const int M = 100005;
#define db double
int read()
{
	int x=0,f=1;char c;
	while((c=getchar())<'0' || c>'9') {if(c=='-') f=-1;}
	while(c>='0' && c<='9') {x=(x<<3)+(x<<1)+(c^48);c=getchar();}
	return x*f;
}
int n;db ans,a[M];
db Abs(db x) {return x>0?x:-x;} 
signed main()
{
	n=read();
	for(int i=1;i<=n;i++)
	{
		db x=read();
		ans+=x/2;
		a[i]=x/2;
	}
	sort(a+1,a+1+n);
	db tmp=a[(n+1)/2];
	for(int i=1;i<=n;i++)
		ans+=Abs(tmp-a[i]);
	printf("%.7f\n",ans/n);
}
#pragma GCC optimize("Ofast")
#pragma GCC optimization ("unroll-loops")
 
#include <bits/stdc++.h>
 
#define IOS ios_base::sync_with_stdio(0); cin.tie(0);
#define pb push_back
#define pf push_front
#define ppb pop_back
#define ppf pop_front
#define ff first
#define ss second
#define ins insert
#define sz(x) (int)x.size()
#define dbg(x) cout << x << "\n";
 
const int N = 2e5 + 5;
const long long int mod = 1e9 + 7;
const long long int Mod = 998244353;
const long double Pi = acos(-1);
const long long int Inf = 4e18;
const long double Eps = 1e-9;
 
int dx[9] = {0, 1, -1, 0, 0, 1, 1, -1, -1};
int dy[9] = {0, 0, 0, 1, -1, 1, -1, 1, -1};
 
using namespace std;

#define int long long int
 
void TestCase (){
        int n;
        cin >> n;

        long double ans = Inf;

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

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

        int sum = accumulate(a.begin() + 1, a.begin() + n + 1, 0LL);
        ans = (long double)sum / n;

        int tn = 0;
        for(int i = 1; i<=n; i++){
                long double x = (long double)a[i] / 2.0;
                
                long double cur = n * x + sum - tn - (n - i + 1) * a[i];

                ans = min(ans, cur / n);
                tn += a[i];
        }

        cout << fixed << setprecision(10) << ans;
}

#undef int
 
int main(){
        IOS;
        int T = 1;
        // cin >> T;
        while(T--){
                TestCase();
                cout << "\n";
        }
        return 0;
}