import heapq

n, m = map(int, input().split())
A = list(map(lambda x: -int(x), input().split()))

heapq.heapify(A)
for i in range(m):
    item = heapq.heappop(A)
    heapq.heappush(A, (-1) * (-item // 2))

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), input().split())) A list(map(lambda x: -int(x), input().split())) list map(lambda x: -int(x), input().split()) map lambda x: -int(x) -int(x) int(x) int x x input().split() ().split () input split heapq.heapify(A) heapq.heapify heapq heapify A for i in range(m):
    item = heapq.heappop(A)
    heapq.heappush(A, (-1) * (-item // 2)) i range(m) range m item = heapq.heappop(A) item heapq.heappop(A) heapq.heappop heapq heappop A heapq.heappush(A, (-1) * (-item // 2)) heapq.heappush heapq heappush A (-1) * (-item // 2) -1 -item // 2 -item item 2 print(-sum(A)) print -sum(A) sum(A) sum A n, m = map(int, input().split()) map(int, input().split()) n item = heapq.heappop(A) heapq.heappop(A) item m = map(int, input().split()) map(int, input().split()) m A = list(map(lambda x: -int(x), input().split())) list(map(lambda x: -int(x), input().split())) A
import heapq

n, m = map(int, input().split())
A = list(map(lambda x: -int(x), input().split()))

heapq.heapify(A)
for i in range(m):
    item = heapq.heappop(A)
    heapq.heappush(A, (-1) * (-item // 2))

print(-sum(A))