n, m = map(int, input().split())
aas = list(map(int, input().split()))
import heapq
hq = []
for i in aas:
    heapq.heappush(hq,-i)
for i in range(m):
    tmp = heapq.heappop(hq)
    heapq.heappush(hq,-((-tmp)//2))
print(-sum(hq)) n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m aas = list(map(int, input().split())) aas list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split import heapq heapq hq = [] hq [] for i in aas:
    heapq.heappush(hq,-i) i aas heapq.heappush(hq,-i) heapq.heappush heapq heappush hq -i i for i in range(m):
    tmp = heapq.heappop(hq)
    heapq.heappush(hq,-((-tmp)//2)) i range(m) range m tmp = heapq.heappop(hq) tmp heapq.heappop(hq) heapq.heappop heapq heappop hq heapq.heappush(hq,-((-tmp)//2)) heapq.heappush heapq heappush hq -((-tmp)//2) (-tmp)//2 -tmp tmp 2 print(-sum(hq)) print -sum(hq) sum(hq) sum hq tmp = heapq.heappop(hq) heapq.heappop(hq) tmp m = map(int, input().split()) map(int, input().split()) m n, m = map(int, input().split()) map(int, input().split()) n hq = [] [] hq aas = list(map(int, input().split())) list(map(int, input().split())) aas
n, m = map(int, input().split())
aas = list(map(int, input().split()))
import heapq
hq = []
for i in aas:
    heapq.heappush(hq,-i)
for i in range(m):
    tmp = heapq.heappop(hq)
    heapq.heappush(hq,-((-tmp)//2))
print(-sum(hq))