local DBG = true
local function dbgpr(...)
    if DBG then
        io.write("[dbg]")
        print(...)
    end
end

local function dbgpr_t(tbl, use_pairs)
    if DBG then
        local enum = ipairs
        if use_pairs then
            enum = pairs
        end
        dbgpr(tbl)
        io.write("[dbg]")
        for i,v in enum(tbl) do
            io.write(i)
            io.write(":")
            io.write(tostring(v))
            io.write(" ")
        end
        print("")
    end
end

local function dbgpr_tp(tbl)
    dbgpr_t(tbl, true)
end

-- C
local read = setmetatable({}, {__index = function(t, k) local a = {} for i=1,#k do table.insert(a, string.sub(k, i, i)) end local r = io.read local u = table.unpack return function() return r(u(a)) end end})
local N = read.n()
local V = {}
for i=1,N do
    local v = read.n()
    V[i] = v
end
table.sort(V, function(x,y) return x>y end)
--dbgpr_t(V)
local sum = 0
for i=1,N-1 do
    local v = V[i]
    sum = sum + v * 2^(-i)
end
local v = V[N]
sum = sum + v * 2^(-(N-1))
print(sum)