from queue import Queue
import itertools
q = Queue()
N = int(input())
v = []
v = list(map(int, input().split()))
result = []
old_max = 0
new_max = 0
tmp = 0
comb = list(itertools.combinations(v, 2))
if len(comb) == 1:
    left,right = comb[0]
    print((left + right)/2)
    exit()
for i in range(len(comb)):
    left,right = comb[i]
    calc = (left + right) / 2
    tmp_lis = v.copy()
    tmp_lis.remove(left)
    tmp_lis.remove(right)
    for i in range(len(tmp_lis)):
        new_max = (calc + tmp_lis[i])/2
        if old_max < new_max:
            old_max = new_max
        calc = new_max
    result.append(old_max)

print(max(result))

