from heapq import *

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

for _ in range(m):
    max_a = heappop(A)*(-1)
    max_a //= 2
    heappush(A, -max_a)
print(-sum(A)) from heapq import * n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m A = list(map(lambda x: int(x)*(-1), input().split())) A list(map(lambda x: int(x)*(-1), input().split())) list map(lambda x: int(x)*(-1), input().split()) map lambda x: int(x)*(-1) int(x)*(-1) int(x) int x -1 x input().split() ().split () input split heapify(A) heapify A for _ in range(m):
    max_a = heappop(A)*(-1)
    max_a //= 2
    heappush(A, -max_a) _ range(m) range m max_a = heappop(A)*(-1) max_a heappop(A)*(-1) heappop(A) heappop A -1 max_a //= 2 max_a 2 heappush(A, -max_a) heappush A -max_a max_a print(-sum(A)) print -sum(A) sum(A) sum A n, m = map(int, input().split()) map(int, input().split()) n max_a = heappop(A)*(-1) heappop(A)*(-1) max_a max_a //= 2 2 max_a m = map(int, input().split()) map(int, input().split()) m A = list(map(lambda x: int(x)*(-1), input().split())) list(map(lambda x: int(x)*(-1), input().split())) A
from heapq import *

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

for _ in range(m):
    max_a = heappop(A)*(-1)
    max_a //= 2
    heappush(A, -max_a)
print(-sum(A))