
/*
ID: meadri01
LANG: C
TASK: test
*/
#include<bits/stdc++.h>
#include<ext/pb_ds/assoc_container.hpp>
#include<ext/pb_ds/tree_policy.hpp>
#define int 				long long
#define w(t)                int t;cin>>t;while(t--)
#define pb                  push_back
#define mk                  make_pair
#define ascSort(v)          sort(v.begin(), v.end())
#define descSort(v)         sort(v.begin(), v.end(), greater<int>())
#define ff                  first
#define ss                  second
#define pi                  pair<int,int>
#define vi                  vector<int>
#define mi                  map<int,int>
#define fill(a,x)           fill(a.begin(), a.end(), x)
#define iota(a,x)           iota(a.begin(), a.end(), x)
#define umapi               unordered_map<int,int>

const int mod1=998244353;
const int mod2=1e9+7;
const int inf=mod2;
using namespace std;
using namespace __gnu_pbds;

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

void FIO(){
	#ifndef ONLINE_JUDGE
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	#endif
	ios_base::sync_with_stdio(false);
    cin.tie(NULL);	
}
void usaco(string filename) {
  // #pragma message("be careful, freopen may be wrong")
	freopen((filename + ".in").c_str(), "r", stdin);
	freopen((filename + ".out").c_str(), "w", stdout);
}

void testcase(){
	int n;cin>>n;
	vi a(n);
	for(int i=0; i<n; i++)cin>>a[i];
	ascSort(a);
	double x=a[(n-1)/2]/2.0,ans2=0.0,ans1=0.0;
	for(int i=0; i<n; i++){
		if(a[i]<=2.0*x){
			ans1+=x;
		}
		else{
			ans1+=x+a[i]*1.0 - 2*x;
		}
	}
	x=a[(n+1)/2]/2.0;
	for(int i=0; i<n; i++){
		if(a[i]<=2.0*x){
			ans2+=x;
		}
		else{
			ans2+=x+a[i]*1.0 - 2*x;
		}
	}
	cout<<fixed<<setprecision(10)<<min(ans1,ans2)/(n*1.0)<<"\n";
}

int32_t main(){
	
	FIO();
	//usaco("test");
	int t=1;
	//cin>>t;
	while(t--){
		testcase();
	}
	return 0;
		
}




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

/*#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
using namespace std;

typedef tree<long long, null_type, less<long long>, rb_tree_tag,
          tree_order_statistics_node_update>
 is;*/

#define fb find_by_order
#define ok order_of_key

#define mem(x,y) memset(x,y,sizeof x)

typedef long long ll;
typedef int ii;

typedef pair<ll,ll> pi;
typedef vector<pi> vii;

#define map unordered_map

#define INF 100000000000007
#define pi 3.141592654

#define T while(t--)
#define for2(i,a,b) for(i=a;i>=b;i--)
#define for3(i,a,b) for(i=a;i<=b;i=i+2)
#define for1(i,a,b) for(i=a;i<=b;i=i+1)
#define for4(i,a,b) for(i=a;i>=b;i=i-2)

#define pb push_back
#define pf push_front
#define mp make_pair

#define ff first
#define ss second

#define si set<ll>
#define se multiset<ll>

typedef long double ld;
typedef vector<ll> vi;

#define all(v) sort(v.begin(),v.end())
#define all1(v) sort(v.rbegin(),v.rend())

#define pff(uuv) printf("%lld\n",uuv)

#define pf1(uu) printf("%.20Lf\n",uu)

bool comp(pair<ll,char> aa, pair<ll,char> bb) {
    if (aa.ff != bb.ff) return aa.ff > bb.ff;
    return aa.ss < bb.ss;
}
bool comp1(pair<ll,char> aa, pair<ll,char> bb) {
    if (aa.ff != bb.ff) return aa.ff < bb.ff;
    return aa.ss > bb.ss;
}
bool comp2(pair<ll,ll> aa, pair<ll,ll> bb) {
    if (aa.ff != bb.ff) return aa.ff > bb.ff;
    return aa.ss < bb.ss;
}
bool comp3(pair<ll,ll> aa, pair<ll,ll> bb) {
    if (aa.ff != bb.ff) return aa.ff < bb.ff;
    return aa.ss > bb.ss;
}

ll rup(ll ik,ll ikk){

 if(ik%ikk==0) return ik/ikk;
 else return (ik/ikk)+1;

}
ll gcd(ll a,ll b){
 if(b==0) return a;

 return gcd(b,a%b);
 
 
}
ll lcm(ll a ,ll b){

 return (a*b)/gcd(a,b);


}

ld ex(ld x,ld y){


    return x+y-min(y,2*x);


}

ii main(){
 
    ios::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    ll t=1;
    //cin>>t;
    while(t--){
        
        ll n;
        ll i;
        ld x;
        cin>>n;
        vector<ld> v;
        vi v2;
        for1(i,1,n){
        
            cin>>x;
            v.pb(x/2);
          v2.pb(x);
            
        }
        all(v);
        
       
        
        if(n%2==1){
        
            ll pp=rup(n,2);
        
            ld sum=0;
            
            for1(i,0,n-1){
            
            
                sum+=ex(v[pp-1],v2[i]);
                //cout<<sum<<"\n";
                
            }
            
            //cout<<sum<<"\n";
            
            sum/=n;
            
            pf1(sum);
            
        }
        else{
            
            ll pp=n/2;
            ll qq=rup(n,2);
            
            ld sum=0;
            ld sum1=0;
            
            
            for1(i,0,n-1){
            
            
                sum+=ex(v[pp-1],v2[i]);
                
                
            }
            
            sum/=n;
            
            
            for1(i,0,n-1){
            
            
                sum1+=ex(v[qq-1],v2[i]);
                
                
            }
            
            sum1/=n;
            
            ld ans=min(sum,sum1);
            
            pf1(ans);
            
        }
            
            
        
     }
  
      

}
