try:
    N = int(input())
    if N>1 and N<51:
        S = input()
        A = S.split()
        A = list(map(float, A))
        sum = A.copy()
        
        if all(len(A)==N and i > 0 and i < 1001 for i in A):
            sum = A.copy()
            for i in range(0,N):
                #print(A[i])
                k = i+1
                
                for j in range(1, N):
                    
                    if k==N:
                        k = 0-N
                    sum[i] = (sum[i]  + A[k])/2
                    k = k+1
                    
        print(max(sum))
                    
except:
    print("Error")