import heapq

N,M= map(int,input().split())
A = list(map(lambda x: int(x)*-1,input().split()))
heapq.heapify(A)
while M:
    tmp=heapq.heappop(A)*-1
    heapq.heappush(A,tmp//2*-1)
    M -=1
print(sum(A)*-1)
     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 while M:
    tmp=heapq.heappop(A)*-1
    heapq.heappush(A,tmp//2*-1)
    M -=1 M tmp=heapq.heappop(A)*-1 tmp heapq.heappop(A)*-1 heapq.heappop(A) heapq.heappop heapq heappop A -1 heapq.heappush(A,tmp//2*-1) heapq.heappush heapq heappush A tmp//2*-1 tmp//2 tmp 2 -1 M -=1 M 1 print(sum(A)*-1) print sum(A)*-1 sum(A) sum A -1 N,M= map(int,input().split()) map(int,input().split()) N tmp=heapq.heappop(A)*-1 heapq.heappop(A)*-1 tmp A = list(map(lambda x: int(x)*-1,input().split())) list(map(lambda x: int(x)*-1,input().split())) A M= map(int,input().split()) map(int,input().split()) M M -=1 1 M
import heapq

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