#include<bits/stdc++.h>
#define int long long
#define rint regester int
const int maxn = 1e6 + 10;
const int mod = 1e9 + 7;
using std::ios;
using std::cin;
using std::cout;
using std::max;
using std::min;
using std::sort;
using std::unique;
using std::lower_bound;
using std::swap;
using std::abs;
using std::acos;
using std::queue;
using std::map;
using std::string;
int read(){int x = 0,f = 1; char ch = getchar(); while(ch < '0' || ch > '9'){if(ch == '-')f = -1; ch = getchar();}while(ch >= '0' && ch <= '9'){x = (x << 1) + (x << 3) + (ch ^ 48); ch = getchar();} return x * f;}
int n, a[maxn], sum, p1;
double minn = 99824435353535.0;
signed main(){
	n = read();
	for(int i = 1; i <= n; i++)a[i] = read(), sum += a[i];
	sort(a + 1, a + 1 + n);
	for(int i = 1; i <= n; i++){
		double x = 0;
		p1 += a[i];
		if(2 * i - n > 0){
			x = a[i] / 2.0; 
		}else
		x = a[i + 1] / 2.0;
		minn = min(minn, (double)(2 * i - n) * x - p1 + sum);
	}
	printf("%.19lf", (double)minn / n);
}
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp> 
#define int long long
#define IOS std::ios::sync_with_stdio(false); cin.tie(NULL);cout.tie(NULL);
#define pb push_back
#define mod 1000000007
//#define lld long double
#define mii map<int, int>
#define mci map<char, int>
#define msi map<string, int>
#define pii pair<int, int>
#define ff first
#define ss second
#define bs(yup,x) binary_search(yup.begin(),yup.end(),x) //it will return bollean value
#define lb(yup,x) lower_bound(yup.begin(),yup.end(),x)  //it will return the adress of the number which is equal to or just greater than x ,and if it is equal to yup.end() than their in no such number exist
#define ub(yup,x) upper_bound(yup.begin(),yup.end(),x)
#define all(x) (x).begin(), (x).end()
#define rep(i,x,y) for(int i=x; i<y; i++)
#define fill(a,b) memset(a, b, sizeof(a))
#define vi vector<int>
#define setbits(x) __builtin_popcountll(x)
using namespace std;
const long long N=262144, INF=2000000000000000000;
const long double EPS= 0.000000000001;
using namespace __gnu_pbds;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> order_set;
 
//order_of_key(x) --> will return number of numbers that are strictly less than x in set
//find_by_order(x) --> will return (x+1)th element in the set
//both are log(n) time
 
int power(int a, int b, int p)
    {
        if(a==0)
        return 0;
        int res=1;
        a%=p;
        while(b>0)
        {
            if(b&1)
            res=(res*a)%p;
            b>>=1;
            a=(a*a)%p;
        }
        return res;
    }
vi prime;
bool isprime[N];
void pre()
{
    for(int i=2;i<N;i++)
    {
        if(isprime[i])
        {
            for(int j=i*i;j<N;j+=i)
            isprime[j]=false;
            prime.pb(i);
        }
    }
    return;
}
/*
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
 
int getRand(int l, int r)
{
    uniform_int_distribution<int> uid(l, r);
    return uid(rng);
}
 */
 
 
int32_t main()
{
    IOS;
    //fill(isprime, true);
    //pre();
    int wertt=1;
    //cin>>wertt;
    for(int pppp=1;pppp<=wertt;pppp++)
    {
        int n;
        cin>>n;
        long double a[n];
        for(int i=0;i<n;i++) cin>>a[i];
        sort(a,a+n);
        long double x=(a[n/2]/2.0);
        long double ans=0;
        for(int i=0;i<n;i++)
        {
            ans+=(x+a[i]-min(x+x,a[i]));
        }
        ans=ans/((long double)(n));
        cout<<fixed << setprecision(15)<<ans;
    }
}

