import heapq

N, M = map(int, input().split())
A = [-int(x) for x in input().split()]
heapq.heapify(A)
for _ in range(M):
    pop = heapq.heappop(A)
    if pop % 2 == 0:
        num = pop//2
    else:
        num = (pop+1)//2
    heapq.heappush(A, num)

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 -int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() -int(x) int(x) int x A = [-int(x) for x in input().split()] A [-int(x) for x in input().split()] heapq.heapify(A) heapq.heapify heapq heapify A for _ in range(M):
    pop = heapq.heappop(A)
    if pop % 2 == 0:
        num = pop//2
    else:
        num = (pop+1)//2
    heapq.heappush(A, num) _ range(M) range M pop = heapq.heappop(A) pop heapq.heappop(A) heapq.heappop heapq heappop A if pop % 2 == 0:
        num = pop//2
    else:
        num = (pop+1)//2
     pop % 2 == 0 pop % 2 pop 2 0 num = pop//2 num pop//2 pop 2 num = (pop+1)//2 num (pop+1)//2 pop+1 pop 1 2 heapq.heappush(A, num) heapq.heappush heapq heappush A num print(-sum(A)) print -sum(A) sum(A) sum A M = map(int, input().split()) map(int, input().split()) M num = pop//2 pop//2 num A = [-int(x) for x in input().split()] [-int(x) for x in input().split()] A num = (pop+1)//2 (pop+1)//2 num N, M = map(int, input().split()) map(int, input().split()) N pop = heapq.heappop(A) heapq.heappop(A) pop
import heapq

N, M = map(int, input().split())
A = [-int(x) for x in input().split()]
heapq.heapify(A)
for _ in range(M):
    pop = heapq.heappop(A)
    if pop % 2 == 0:
        num = pop//2
    else:
        num = (pop+1)//2
    heapq.heappush(A, num)

print(-sum(A))
