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