import heapq
N,M = map(int,input().split())
A = list(map(int,input().split()))
for i in range(N):
    A[i] = -A[i]
heapq.heapify(A)

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

for i in range(M):
    trgt = -heapq.heappop(A)//2
    heapq.heappush(A,-trgt)
print(-sum(A))