n = int(input())
s = list(map(int,input().split()))
min_ave = 100000
for i, val in enumerate(s):
    for j, val2 in enumerate(s):
        if i == j:
            continue
        ave = (val + val2) / 2
        if min_ave > ave:
            min_ave = ave 
print((max(s) + min_ave)/2)