try:
    N = int(input())
    if N>1:
        S = input()
        A = S.split()
        A = list(map(int, A))
        sum = [0]*(N)
        sum = A.copy()
        for k in range(0, N):
            for i in range(0, N-1):
                if((k+i)>=(N-1)):
                    j = i+k+1-N
                else:
                    j=i+k+1
                sum[k] = (sum[k]+A[j])/2
            
    print(max(sum))

except:
    print("Error")