local function reada(n,m)m=m or 1 r={}for i=1,m do r[i]={}end for i=1,n do for j=1,m do r[j][i]=io.read"*n"end end return unpack(r)end
N=io.read"*n"
M=io.read"*n"
A=reada(N)

for j=1,M do
	maxv=A[1]
	maxi=1
	for i=2,N do
		if(maxv<A[i])then
			maxv=A[i]
			maxi=i
		end
	end
	A[maxi]=A[maxi]*.5
end

s=0
for i=1,N do s=s+math.floor(A[i])end
print(s)