import heapq

n,m = map(int,input().split())

a = list(map(int,input().split()))

a = [-1*i for i in a]

heapq.heapify(a)

count = 0

while count < m:
    item = heapq.heappop(a)
    item= abs(item)
    discount_item = item//2
    heapq.heappush(a,-1*discount_item)
    count += 1

print(abs(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 -1*i for i in a for i in a i a for i in a -1*i -1 i a = [-1*i for i in a] a [-1*i for i in a] heapq.heapify(a) heapq.heapify heapq heapify a count = 0 count 0 while count < m:
    item = heapq.heappop(a)
    item= abs(item)
    discount_item = item//2
    heapq.heappush(a,-1*discount_item)
    count += 1 count < m count m item = heapq.heappop(a) item heapq.heappop(a) heapq.heappop heapq heappop a item= abs(item) item abs(item) abs item discount_item = item//2 discount_item item//2 item 2 heapq.heappush(a,-1*discount_item) heapq.heappush heapq heappush a -1*discount_item -1 discount_item count += 1 count 1 print(abs(sum(a))) print abs(sum(a)) abs sum(a) sum a n,m = map(int,input().split()) map(int,input().split()) n m = map(int,input().split()) map(int,input().split()) m item= abs(item) abs(item) item item = heapq.heappop(a) heapq.heappop(a) item a = [-1*i for i in a] [-1*i for i in a] a count += 1 1 count count = 0 0 count a = list(map(int,input().split())) list(map(int,input().split())) a discount_item = item//2 item//2 discount_item
import heapq

n,m = map(int,input().split())

a = list(map(int,input().split()))

a = [-1*i for i in a]

heapq.heapify(a)

count = 0

while count < m:
    item = heapq.heappop(a)
    item= abs(item)
    discount_item = item//2
    heapq.heappush(a,-1*discount_item)
    count += 1

print(abs(sum(a)))