import heapq

n, m = map(int, input().split())
a = list(map(int, input().split()))
a = [-v for v in a]
heapq.heapify(a)

for _ in range(m):
    x = heapq.heappop(a)
    heapq.heappush(a, (x+1)//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(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split -v for v in a for v in a v a for v in a -v v a = [-v for v in a] a [-v for v in a] heapq.heapify(a) heapq.heapify heapq heapify a for _ in range(m):
    x = heapq.heappop(a)
    heapq.heappush(a, (x+1)//2) _ range(m) range m x = heapq.heappop(a) x heapq.heappop(a) heapq.heappop heapq heappop a heapq.heappush(a, (x+1)//2) heapq.heappush heapq heappush a (x+1)//2 x+1 x 1 2 print(-sum(a)) print -sum(a) sum(a) sum a n, m = map(int, input().split()) map(int, input().split()) n x = heapq.heappop(a) heapq.heappop(a) x a = list(map(int, input().split())) list(map(int, input().split())) a m = map(int, input().split()) map(int, input().split()) m a = [-v for v in a] [-v for v in a] a
import heapq

n, m = map(int, input().split())
a = list(map(int, input().split()))
a = [-v for v in a]
heapq.heapify(a)

for _ in range(m):
    x = heapq.heappop(a)
    heapq.heappush(a, (x+1)//2)

print(-sum(a))