import heapq
N, M = map(int, input().split())
A = [-int(i) for i in input().split()]
heapq.heapify(A)
for i in range(M):
    max_ = heapq.heappop(A)
    max_ = -max_//2
    heapq.heappush(A, -max_)
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 -int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() -int(i) int(i) int i A = [-int(i) for i in input().split()] A [-int(i) for i in input().split()] heapq.heapify(A) heapq.heapify heapq heapify A for i in range(M):
    max_ = heapq.heappop(A)
    max_ = -max_//2
    heapq.heappush(A, -max_) i range(M) range M max_ = heapq.heappop(A) max_ heapq.heappop(A) heapq.heappop heapq heappop A max_ = -max_//2 max_ -max_//2 -max_ max_ 2 heapq.heappush(A, -max_) heapq.heappush heapq heappush A -max_ max_ print(-sum(A)) print -sum(A) sum(A) sum A N, M = map(int, input().split()) map(int, input().split()) N A = [-int(i) for i in input().split()] [-int(i) for i in input().split()] A M = map(int, input().split()) map(int, input().split()) M max_ = -max_//2 -max_//2 max_ max_ = heapq.heappop(A) heapq.heappop(A) max_
import heapq
N, M = map(int, input().split())
A = [-int(i) for i in input().split()]
heapq.heapify(A)
for i in range(M):
    max_ = heapq.heappop(A)
    max_ = -max_//2
    heapq.heappush(A, -max_)
print(-sum(A))