def execute(index, a_array):
    result_array = []
    for i in range(index):
        if i == index - 1:
            break
        for j in range(index - i):
            if j >= index - i:
                break
            result_array.append(((a_array[i] + a_array[i+j]) / 2, i, i+j))
            
    result_array.sort()
    result = result_array[0]
    
    new_array = []
    for index, a in enumerate(a_array):
        if index == result[1] or index == result[2]:
            continue
        new_array.append(a)
    new_array.append(result[0])
    
    if len(new_array) == 2:
        print((new_array[0] + new_array[1]) / 2)
    else:
        execute(len(new_array), new_array)
        

import sys
a = []
for l in sys.stdin:
    a.append(l)

a_array = a[1].split(' ')
execute(int(a[0]), [float(i) for i in a_array])
