N = int(input())

v = list(map(int, input().split())) # Ni個目の具材の価値

if len(v) % 2 == 0:
    print(sum(v) / len(v))
else:
    s_list = list(sorted(v))
    result = sum(s_list[:2]) / 2 + sum(s_list[2:]) / len(s_list[2:])
    print(result / 2)