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):
    # 一番高い商品に割引券を使って入れ直す
    a_max = -1 * heapq.heappop(a)
    a_max //= 2
    heapq.heappush(a, -a_max)

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):
    # 一番高い商品に割引券を使って入れ直す
    a_max = -1 * heapq.heappop(a)
    a_max //= 2
    heapq.heappush(a, -a_max) _ range(m) range m a_max = -1 * heapq.heappop(a) a_max -1 * heapq.heappop(a) -1 heapq.heappop(a) heapq.heappop heapq heappop a a_max //= 2 a_max 2 heapq.heappush(a, -a_max) heapq.heappush heapq heappush a -a_max a_max print(-sum(a)) print -sum(a) sum(a) sum a a_max //= 2 2 a_max m = map(int, input().split()) map(int, input().split()) m a_max = -1 * heapq.heappop(a) -1 * heapq.heappop(a) a_max a = list(map(lambda x: int(x)*(-1), input().split())) list(map(lambda x: int(x)*(-1), input().split())) a n, m = map(int, input().split()) map(int, input().split()) n
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):
    # 一番高い商品に割引券を使って入れ直す
    a_max = -1 * heapq.heappop(a)
    a_max //= 2
    heapq.heappush(a, -a_max)

print(-sum(a))
