import heapq
n,m=map(int,input().split())
alist=list(map(int,input().split()))
malist=[]
for a in alist:
    malist.append(-a)

heapq.heapify(malist)

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

print(-sum(malist)) import heapq heapq n,m=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m alist=list(map(int,input().split())) alist list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split malist=[] malist [] for a in alist:
    malist.append(-a) a alist malist.append(-a) malist.append malist append -a a heapq.heapify(malist) heapq.heapify heapq heapify malist for i in range(m):
    tmp = -heapq.heappop(malist)
    tmp //= 2
    heapq.heappush(malist,-tmp) i range(m) range m tmp = -heapq.heappop(malist) tmp -heapq.heappop(malist) heapq.heappop(malist) heapq.heappop heapq heappop malist tmp //= 2 tmp 2 heapq.heappush(malist,-tmp) heapq.heappush heapq heappush malist -tmp tmp print(-sum(malist)) print -sum(malist) sum(malist) sum malist tmp = -heapq.heappop(malist) -heapq.heappop(malist) tmp malist=[] [] malist tmp //= 2 2 tmp n,m=map(int,input().split()) map(int,input().split()) n m=map(int,input().split()) map(int,input().split()) m alist=list(map(int,input().split())) list(map(int,input().split())) alist
import heapq
n,m=map(int,input().split())
alist=list(map(int,input().split()))
malist=[]
for a in alist:
    malist.append(-a)

heapq.heapify(malist)

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

print(-sum(malist))
