import heapq

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

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

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

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

