from heapq import heapify,heappush,heappop
N, M = map(int, input().split())
A = list(map(lambda x: -int(x), input().split()))
heapify(A)
for i in range(M):
  tmp = heappop(A)
  heappush(A,-((-tmp)//2))
A = list(A)

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 i in range(M):
  tmp = heappop(A)
  heappush(A,-((-tmp)//2)) i range(M) range M tmp = heappop(A) tmp heappop(A) heappop A heappush(A,-((-tmp)//2)) heappush A -((-tmp)//2) (-tmp)//2 -tmp tmp 2 A = list(A) A list(A) list A print(-sum(A)) print -sum(A) sum(A) sum A M = map(int, input().split()) map(int, input().split()) M tmp = heappop(A) heappop(A) tmp N, M = map(int, input().split()) map(int, input().split()) N A = list(A) list(A) A A = list(map(lambda x: -int(x), input().split())) list(map(lambda x: -int(x), input().split())) A
from heapq import heapify,heappush,heappop
N, M = map(int, input().split())
A = list(map(lambda x: -int(x), input().split()))
heapify(A)
for i in range(M):
  tmp = heappop(A)
  heappush(A,-((-tmp)//2))
A = list(A)

print(-sum(A))
