import heapq
n, m = map(int, input().split())
a = list(map(lambda x: -int(x), input().split()))
heapq.heapify(a)
num = 0
while num < m:
    maximum = -1 * heapq.heappop(a)
    maximum //= 2
    heapq.heappush(a, -maximum)
    num += 1
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 num = 0 num 0 while num < m:
    maximum = -1 * heapq.heappop(a)
    maximum //= 2
    heapq.heappush(a, -maximum)
    num += 1 num < m num m maximum = -1 * heapq.heappop(a) maximum -1 * heapq.heappop(a) -1 heapq.heappop(a) heapq.heappop heapq heappop a maximum //= 2 maximum 2 heapq.heappush(a, -maximum) heapq.heappush heapq heappush a -maximum maximum num += 1 num 1 print(-sum(a)) print -sum(a) sum(a) sum a m = map(int, input().split()) map(int, input().split()) m num += 1 1 num maximum = -1 * heapq.heappop(a) -1 * heapq.heappop(a) maximum maximum //= 2 2 maximum n, m = map(int, input().split()) map(int, input().split()) n a = list(map(lambda x: -int(x), input().split())) list(map(lambda x: -int(x), input().split())) a num = 0 0 num
import heapq
n, m = map(int, input().split())
a = list(map(lambda x: -int(x), input().split()))
heapq.heapify(a)
num = 0
while num < m:
    maximum = -1 * heapq.heappop(a)
    maximum //= 2
    heapq.heappush(a, -maximum)
    num += 1
print(-sum(a))