#1行目
hoge = gets.chomp.to_i

#2行目読み込み
b = gets.chomp.split(" ").map!{|i| i.to_i}

c = b.max(hoge)
unchi = 0

for i in 0..(hoge-1) do
  unchi = unchi + c[i] / (2.0**(i+1))
end
 print unchi + c[hoge-1] / 2.0**hoge