from heapq import heappop, heappush, heapify

N, M = map(int,input().split())
A = list(map(int, input().split()))
A = list(map(lambda x: x*(-1), A))
heapify(A)

for i in range(M):
    temp = int(heappop(A)/2)
    heappush(A, temp)

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

N, M = map(int,input().split())
A = list(map(int, input().split()))
A = list(map(lambda x: x*(-1), A))
heapify(A)

for i in range(M):
    temp = int(heappop(A)/2)
    heappush(A, temp)

print(-sum(A))