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

