from itertools import combinations, permutations
N = int(input())
#N,K = map(int,input().split())
#N = int(input())
V = list(map(int,input().split()))
s=0
S=[0]
for C in combinations(V,2):
    n=N
    v=V.copy()
    v.remove(C[0])
    v.remove(C[1])
    s=(C[0]+C[1])/2**(n-1)
    n-=2
    #print(C,s)
    for D in permutations(v):
        m=n
        k=s
        for i in range(m):

            k+=D[i]/(2**m)
            m-=1
        S.append(k)
#        print(k,D)
print(max(S))
