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