n,m=io.read("*n","*n","*l")
a={}
for i=1,n do
    a[i]=io.read("*n")
end
table.sort(a)
if n==1 then
    return print(string.format("%d",a[1]//(2^m)))
end

t={}
key=n
for i=1,m do
    a[key]=a[key]//2
    table.insert(t,{a[key],key})
    if #t>1 then
        table.sort(t,function(a,b)
            return a[1]<b[1]
        end)
    end
    if t[#t][1]<=a[key] then
        key=t[#t][2]
    else
        if key-1==0 then
            break
        else
            key=key-1
        end
    end
end

total=0
for i=1,n do
    total=total+a[i]
end
print(total)