import heapq
import math
from heapq import heappop
n,m = map(int,input().split())
A = list(map(lambda x:-int(x),input().split()))
heapq.heapify(A)

for i in range(m):
    x = heapq.heappop(A)
    heapq.heappush(A,-(-x//2))

print(-sum(A)) import heapq heapq import math math from heapq import heappop 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),input().split())) A list(map(lambda x:-int(x),input().split())) list map(lambda x:-int(x),input().split()) map lambda x:-int(x) -int(x) int(x) int x x input().split() ().split () input split heapq.heapify(A) heapq.heapify heapq heapify A for i in range(m):
    x = heapq.heappop(A)
    heapq.heappush(A,-(-x//2)) i range(m) range m x = heapq.heappop(A) x heapq.heappop(A) heapq.heappop heapq heappop A heapq.heappush(A,-(-x//2)) heapq.heappush heapq heappush A -(-x//2) -x//2 -x x 2 print(-sum(A)) print -sum(A) sum(A) sum A A = list(map(lambda x:-int(x),input().split())) list(map(lambda x:-int(x),input().split())) A n,m = map(int,input().split()) map(int,input().split()) n m = map(int,input().split()) map(int,input().split()) m x = heapq.heappop(A) heapq.heappop(A) x
import heapq
import math
from heapq import heappop
n,m = map(int,input().split())
A = list(map(lambda x:-int(x),input().split()))
heapq.heapify(A)

for i in range(m):
    x = heapq.heappop(A)
    heapq.heappush(A,-(-x//2))

print(-sum(A))