N = int(input())
A = list(map(int,input().split()))

import itertools
B = list(itertools.combinations(A,2))

result=[]
for b in B:
  a = A.copy()
  while len(a)>=3:
    first = (b[0]+b[1])/2
    a.remove(b[0])
    a.remove(b[1])
    a.append(first)
  result.append((a[0]+a[1])/2)
print(max(result))