# https://atcoder.jp/contests/abc138/tasks/abc138_c

N = gets.to_i
vs = gets.split.map(&:to_i)

ans = vs
  .sort
  .reverse
  .map.with_index(1)
  .reduce(0) { |m, (a, i)| m + a.to_f / 2**[i, N - 1].min }

puts ans
