import itertools

num = int(input())
list_org = input().split()
sequence = list(itertools.permutations(list_org))
kazo = len(sequence)
power = [1]
bunbo = 2**(num-1)
max_values = []
for i in range(num-1):
  power.append(2**i)
for i in range(kazo):
  a = 0
  for j in range(num):
    a += int(power[j]) * int(sequence[i][j])
  max_values.append(a)
  
print(max(max_values)/bunbo)
