from itertools import combinations
n = int(input())
v = list(map(int, input().split()))
if len(set(v)) == 1:
    print(v[0])
elif len(set(v)) == 2:
   print(sum(list(set(v)))/2)
else:
    p = set(v)
    res = []
    s = list(combinations(p, 2))
    for i in s:
        a = sum(i)/2
        b = max(list(p-set(i)))
        res.append((a+b)/2)
    print(max(res))
