import heapq
N, M = map(int, input().split())
heap = list(map(lambda x: -1*int(x), input().split()))
heapq.heapify(heap)

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

while M > 0:
    x = heapq.heappop(heap)
    heapq.heappush(heap, int(x/2))
    M -= 1
print(sum(heap)*(-1))