n = int(input())
s = list(map(int,input().split()))
if len(s) == 2:
    print((s[0] + s[1]) / 2)
    exit()
max_ave = 0
for i, val in enumerate(s):
    for j, val2 in enumerate(s):
        if i == j or max(s) == val or max(s) == val2: 
            continue
        ave = (val + val2) / 2
        ave = (max(s) + ave) /2 
        if max_ave < ave:
            max_ave = ave 
print(max_ave)