N,M,*A=map(int,open(0).read().split())
from heapq import*
A=list(map(lambda x:-x,A))
heapify(A)
for _ in range(M):heappush(A,-(-heappop(A)//2))
print(-sum(A)) N,M,*A=map(int,open(0).read().split()) N map(int,open(0).read().split()) map int open(0).read().split() (0).read().split (0).read() (0).read (0) open 0 read split M *A A from heapq import* A=list(map(lambda x:-x,A)) A list(map(lambda x:-x,A)) list map(lambda x:-x,A) map lambda x:-x -x x x A heapify(A) heapify A for _ in range(M):heappush(A,-(-heappop(A)//2)) _ range(M) range M print(-sum(A)) print -sum(A) sum(A) sum A A=list(map(lambda x:-x,A)) list(map(lambda x:-x,A)) A N,M,*A=map(int,open(0).read().split()) map(int,open(0).read().split()) N M,*A=map(int,open(0).read().split()) map(int,open(0).read().split()) M
N,M,*A=map(int,open(0).read().split())
from heapq import*
A=list(map(lambda x:-x,A))
heapify(A)
for _ in range(M):heappush(A,-(-heappop(A)//2))
print(-sum(A))
