num = int(input())
values_list = list(map(int, input().split()))
lst = sorted(values_list)
m = 0
n = m + 2
if num == 2:
    num = 3
else:
    pass
for i in range(num-2):
    c_v = 0.5 * sum(lst[m:n])
    if len(lst) == 2:
        pass
    else:
        c_v = 0.5 * (c_v + lst[n])
    m += 1
print(c_v)