from heapq import heapify, heappush, heappop
n, m = map(int, input().split())
a = list(map(lambda x: -int(x), input().split()))

heapify(a)

for _ in range(m):
    top = heappop(a)
    top = -top // 2
    heappush(a, -top)

print(-sum(a)) from heapq import heapify, heappush, heappop 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 heapify(a) heapify a for _ in range(m):
    top = heappop(a)
    top = -top // 2
    heappush(a, -top) _ range(m) range m top = heappop(a) top heappop(a) heappop a top = -top // 2 top -top // 2 -top top 2 heappush(a, -top) heappush a -top top print(-sum(a)) print -sum(a) sum(a) sum a top = heappop(a) heappop(a) top n, m = map(int, input().split()) map(int, input().split()) n a = list(map(lambda x: -int(x), input().split())) list(map(lambda x: -int(x), input().split())) a top = -top // 2 -top // 2 top m = map(int, input().split()) map(int, input().split()) m
from heapq import heapify, heappush, heappop
n, m = map(int, input().split())
a = list(map(lambda x: -int(x), input().split()))

heapify(a)

for _ in range(m):
    top = heappop(a)
    top = -top // 2
    heappush(a, -top)

print(-sum(a))