
import heapq
N, M = map(int, input().split())
A = list(map(int, input().split()))
A = [-A[i] for i in range(N)]
ans = 0
heapq.heapify(A)
for i in range(M):
    value = -heapq.heappop(A)
    value //= 2
    heapq.heappush(A, -value)
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[i] for i in range(N) for i in range(N) i range(N) range N for i in range(N) -A[i] A[i] A i A = [-A[i] for i in range(N)] A [-A[i] for i in range(N)] ans = 0 ans 0 heapq.heapify(A) heapq.heapify heapq heapify A for i in range(M):
    value = -heapq.heappop(A)
    value //= 2
    heapq.heappush(A, -value) i range(M) range M value = -heapq.heappop(A) value -heapq.heappop(A) heapq.heappop(A) heapq.heappop heapq heappop A value //= 2 value 2 heapq.heappush(A, -value) heapq.heappush heapq heappush A -value value print(-sum(A)) print -sum(A) sum(A) sum A N, M = map(int, input().split()) map(int, input().split()) N A = list(map(int, input().split())) list(map(int, input().split())) A value = -heapq.heappop(A) -heapq.heappop(A) value A = [-A[i] for i in range(N)] [-A[i] for i in range(N)] A value //= 2 2 value M = map(int, input().split()) map(int, input().split()) M ans = 0 0 ans

import heapq
N, M = map(int, input().split())
A = list(map(int, input().split()))
A = [-A[i] for i in range(N)]
ans = 0
heapq.heapify(A)
for i in range(M):
    value = -heapq.heappop(A)
    value //= 2
    heapq.heappush(A, -value)
print(-sum(A))