n = gets.strip.to_i
v = gets.strip.split.map(&:to_f)

max = 0

v.permutation(n) do |a|
  value = 0
  (a.length-1).times do |i|
    a[i+1] = (a[i] + a[i+1])/2
  end
  max =  a[v.length-1] if max < a[v.length-1]
end

puts max