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 _ in range(M):
    tmp = heapq.heappop(A) * (-1)
    tmp //= 2
    heapq.heappush(A, tmp * (-1))

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

print(-sum(A))
