#include<bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<=b;i++)
#define pre(i,a,b) for(int i=a;i>=b;i--)
#define N 1000005
using namespace std;
int n,a[N];
double calc(double x){
	double sum=0;
	rep(i,1,n)sum+=(a[i]-min(1.00*a[i],x*2))/(1.00*n);
	return sum+x;
}
int main(){
	scanf("%d",&n);
	rep(i,1,n)scanf("%d",&a[i]);
	sort(a+1,a+n+1);
	if(n==1)printf("%.10lf\n",a[1]/2.00);
	else printf("%.10lf\n",min(calc(a[n/2]/2.00),calc(a[n/2+1]/2.00)));
	return 0;
}
#include <bits/stdc++.h>
#include <time.h>
#define rep(i, n)	for(int i=0;i<(int)(n);i++)
#define ALL(a)	(a).begin(),(a).end()
using namespace std;
using ll=long long;
typedef pair<int,int> P;

const int INF=1e9;

bool LOCAL_TEST = false;
int h[30][30],v[30][30],u[30][30];
double priority[30][30];
vector<string> paths;
vector<int> dis,a(1000);
vector<double> e(1000),dis_ave;
map<int,char> mp;
map<char,int> mov;

inline void InitRand(){
    srand((unsigned int)time(NULL));
}

void move(int si,int sj,int ti,int tj,string& path){
    int y=si,x=sj;
    while(y!=ti||x!=tj){
        if(y==ti){
            rep(i,abs(tj-x)) path+=mp[1];
            break;
        }
        else if(x==tj){
            rep(i,abs(ti-y)) path+=mp[0];
            break;
        }
        if(LOCAL_TEST){

        }else{
            int next;
            if(u[y+mov[mp[0]]][x]==INF&&u[y][x+mov[mp[1]]]==INF) next=rand()%2;
            else if(u[y+mov[mp[0]]][x]==INF) next=0;
            else if(u[y][x+mov[mp[1]]]==INF) next=1;
            else{
                if(u[y+mov[mp[0]]][x]<=u[y][x+mov[mp[1]]]) next=0;
                else next=1;
            }
            path+=mp[next];
            if(next==0){
                if(y<ti) y++;
                else y--;
            }else{
                if(x<tj) x++;
                else x--;
            }
        }
    }
    if(LOCAL_TEST){
        y=si,x=sj;
        int d=0;
        rep(i,path.size()){
            if(path[i]=='U') d+=v[y-1][x],y--;
            if(path[i]=='D') d+=v[y][x],y++;
            if(path[i]=='L') d+=h[y][x-1],x--;
            if(path[i]=='R') d+=h[y][x],x++;
        }
        dis.push_back(d);
    }
}

void draw_cost(int si,int sj,int ti,int tj,int a,string path){
    int y=si,x=sj;
    u[y][x]=min(u[y][x],a);
    rep(i,path.size()){
        if(path[i]=='U') y--;
        if(path[i]=='D') y++;
        if(path[i]=='L') x--;
        if(path[i]=='R') x++;
        u[y][x]=min(u[y][x],a);
    }
}

void read_s_t_a_e(int k){
    int si,sj,ti,tj;
    cin>>si>>sj>>ti>>tj>>a[k]>>e[k];
    string path;
    if(si<=ti) mp[0]='D';
    else mp[0]='U';
    if(sj<=tj) mp[1]='R';
    else mp[1]='L';
    move(si,sj,ti,tj,path);
    paths.push_back(path);
    dis_ave.push_back((double)dis[k]/(abs(ti-si)+abs(tj-sj)));
}

void read_s_t(){
    int si,sj,ti,tj,a;
    cin>>si>>sj>>ti>>tj;
    string path;
    if(si<=ti) mp[0]='D';
    else mp[0]='U';
    if(sj<=tj) mp[1]='R';
    else mp[1]='L';
    move(si,sj,ti,tj,path);
    cout<<path<<endl;
    flush(cout);
    cin>>a;
    a/=(int)path.size();
    draw_cost(si,sj,ti,tj,a,path);
}

int main(){
    rep(i,30) fill(priority[i],priority[i]+30,-1);
    mov['U']=-1;
    mov['D']=1;
    mov['L']=-1;
    mov['R']=1;
    if(LOCAL_TEST){
        rep(i,30) rep(j,29) cin>>h[i][j];
        rep(i,29) rep(j,30) cin>>v[i][j];
    }else{
        rep(i,30) fill(u[i],u[i]+30,INF);
    }
    rep(k,1000){
        if(LOCAL_TEST) read_s_t_a_e(k);
        else read_s_t();
    }
    if(LOCAL_TEST){
        ofstream output("out.txt");
        rep(k,1000) output<<paths[k]<<'\n';
        rep(k,1000) cout<<k<<" "<<dis[k]<<" "
        <<(double)a[k]/dis[k]<<" "<<dis[k]*e[k]<<" "<<dis_ave[k]<<endl;
    }
}