import heapq

n, m = map(int, input().split())
A = list(map(lambda x: int(x)*(-1), input().split()))

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

heapq.heapify(A)
for i in range(m):
    tmp = heapq.heappop(A)*(-1)
    heapq.heappush(A, (-1)*(tmp//2))
print(sum(A)*(-1))
