import heapq

n, m = map(int, input().split()) 
al = list(map(int, input().split())) 

al = [v*(-1) for v in al]
heapq.heapify(al)

for _ in range(m):
    p = heapq.heappop(al)
    heapq.heappush(al, ((-1)*p//2)*(-1) )

print(sum(al)*(-1)) import heapq heapq n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m al = list(map(int, input().split())) al list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split v*(-1) for v in al for v in al v al for v in al v*(-1) v -1 al = [v*(-1) for v in al] al [v*(-1) for v in al] heapq.heapify(al) heapq.heapify heapq heapify al for _ in range(m):
    p = heapq.heappop(al)
    heapq.heappush(al, ((-1)*p//2)*(-1) ) _ range(m) range m p = heapq.heappop(al) p heapq.heappop(al) heapq.heappop heapq heappop al heapq.heappush(al, ((-1)*p//2)*(-1) ) heapq.heappush heapq heappush al ((-1)*p//2)*(-1) (-1)*p//2 (-1)*p -1 p 2 -1 print(sum(al)*(-1)) print sum(al)*(-1) sum(al) sum al -1 al = list(map(int, input().split())) list(map(int, input().split())) al m = map(int, input().split()) map(int, input().split()) m n, m = map(int, input().split()) map(int, input().split()) n al = [v*(-1) for v in al] [v*(-1) for v in al] al p = heapq.heappop(al) heapq.heappop(al) p
import heapq

n, m = map(int, input().split()) 
al = list(map(int, input().split())) 

al = [v*(-1) for v in al]
heapq.heapify(al)

for _ in range(m):
    p = heapq.heappop(al)
    heapq.heappush(al, ((-1)*p//2)*(-1) )

print(sum(al)*(-1))