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