N = int(input())
v = list(map(int, input().split()))
while True:
    if len(v) == 1:
        print(v[0])
        break
    s = sum(v)
    t = (-1, -1, 0)
    for i in range(len(v)):
        for j in range(i, len(v)):
            x = s - v[i]/2 - v[j]/2
            if x > t[2]:
                t = (i, j, x)
    x = v.pop(i)
    y = v.pop(j-1)
    v.append((x+y)/2)
