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

print(-sum(A))
