import heapq

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

for _ in range(m):
    cur = heapq.heappop(a)
    heapq.heappush(a, -(-cur//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 -int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() -int(x) int(x) int x a = [ -int(x) for x in input().split()] a [ -int(x) for x in input().split()] heapq.heapify(a) heapq.heapify heapq heapify a for _ in range(m):
    cur = heapq.heappop(a)
    heapq.heappush(a, -(-cur//2)) _ range(m) range m cur = heapq.heappop(a) cur heapq.heappop(a) heapq.heappop heapq heappop a heapq.heappush(a, -(-cur//2)) heapq.heappush heapq heappush a -(-cur//2) -cur//2 -cur cur 2 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 = [ -int(x) for x in input().split()] [ -int(x) for x in input().split()] a cur = heapq.heappop(a) heapq.heappop(a) cur
import heapq

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

for _ in range(m):
    cur = heapq.heappop(a)
    heapq.heappush(a, -(-cur//2))
print(-sum(a))