import heapq
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 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(a) heapq.heappop heapq heappop a heapq.heappush(a,-(x//2)) heapq.heappush heapq heappush a -(x//2) x//2 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 x=-heapq.heappop(a) -heapq.heappop(a) x n,m=map(int,input().split()) map(int,input().split()) n m=map(int,input().split()) map(int,input().split()) m
import heapq
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))