import heapq
N,M=map(int,input().split())
A=list(map(lambda x:-int(x),input().split()))
heapq.heapify(A)

for _ in range(M):
    a=-heapq.heappop(A)
    a//=2
    heapq.heappush(A,-a)

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 _ in range(M):
    a=-heapq.heappop(A)
    a//=2
    heapq.heappush(A,-a) _ range(M) range M a=-heapq.heappop(A) a -heapq.heappop(A) heapq.heappop(A) heapq.heappop heapq heappop A a//=2 a 2 heapq.heappush(A,-a) heapq.heappush heapq heappush A -a a print(-sum(A)) print -sum(A) sum(A) sum A a=-heapq.heappop(A) -heapq.heappop(A) 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 a//=2 2 a
import heapq
N,M=map(int,input().split())
A=list(map(lambda x:-int(x),input().split()))
heapq.heapify(A)

for _ in range(M):
    a=-heapq.heappop(A)
    a//=2
    heapq.heappush(A,-a)

print(-sum(A))