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

for i in range(m):
    p = heapq.heappop(a)*(-1)
    p //= 2
    heapq.heappush(a, -p)

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

for i in range(m):
    p = heapq.heappop(a)*(-1)
    p //= 2
    heapq.heappush(a, -p)

print(-sum(a))