import heapq
N,M=map(int,input().split())
A=list(map(lambda x:int(x)*(-1),input().split()))

heapq.heapify(A)

for _ in range(M):
    tmp=heapq.heappop(A)
    tmp=-tmp//2
    heapq.heappush(A,-tmp)

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

heapq.heapify(A)

for _ in range(M):
    tmp=heapq.heappop(A)
    tmp=-tmp//2
    heapq.heappush(A,-tmp)

print(-sum(A))
