local n = io.read("*n")
local v = {}
for i = 1, n do
  v[i] = io.read("*n")
end
table.sort(v, function(a, b) return a > b end)

local sum = 0
local mul = 2
for i = 1, n do
  sum = sum + v[i] / mul
  if i ~= n - 1 then mul = mul * 2 end
end
print(string.format("%.10f",sum))
