N = int(input())

V = list(map(int, input().split()))

if N % 2 == 0:
    print(sum(V)/N)
    exit()

V = sorted(V)

# print(V)
max_value = V[-1]
# print(max_value)

tmp = sum(V[:-1]) / (N-1)
# print(tmp)
print((max_value+tmp)/2)
