#include<bits/stdc++.h>

#define db double 

using namespace std;

int read()
{
	int a=0,f=1,c=getchar();
	while(!isdigit(c))
	{
		if(c=='-')f=-1;
		c=getchar();
	}
	while(isdigit(c))
	{
		a=a*10+c-'0';
		c=getchar();
	}
	return a*f;
}

const int N=1e5+10;
const db INF=1e18;

int n;
int a[N];

int main()
{
//	freopen("1.in","r",stdin);
	
	n=read();
	for(int i=1;i<=n;++i)a[i]=read();
	sort(a+1,a+n+1);
	
	db ans=INF,sum=0;
	for(int i=0;i<=n;++i)
	{
		sum+=a[i];
		
		db x=(db)a[i]/2;
		ans=min(ans,n*x-(sum+(n-i)*x*2));
	}
	ans=(ans+sum)/n;
	printf("%lf\n",ans);
	
	return 0;
}
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (int)(n); i++)

using namespace std;
using LL = long long;
using P = pair<int,int>;
using vv = vector<vector<int>>;
const int INF = (int)1e9;
const LL LINF = (LL)1e18;

int main(){
	int K;
	cin >> K;
	int ans = 0;
	for(int A = 1; A <= K; A++){
		for(int B = 1; B <= K; B++){
			if(A * B > K) break;
			ans += K / (A * B);
		}
	}
	cout << ans << endl;

	return 0;
}
