
N = int(input())

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

if len(v) <= 2:
    print(sum(v) / 2)
else:

    result = 0

    while(True):

        new_list = []
        for i in list(range(0, len(v), 2)):
            l = v[i:i+2]
            if len(l) % 2 == 0:
                new_list.append(sum(l) / 2)
            else:
                new_list.append(l[0])

        v = list(sorted(new_list))

        if len(v) <= 2:
            break

    print(sum(v) / 2)
