N = int(input())
y =[]
for i in range(N):
    x = int(input())
    y.append(x)
    
max1 = y[1]
max2 = y[2]
for j in y:
    if j > max1 and j > max2:  #max1が一番大きいと考える
        max1 = y[j]
    elif j > max2 and j < max1:
        max2 = y[j]
    else:
        pass

print((max1 + max2)/N)


