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