# 優先度付キューのimport
import heapq

n, m = map(int, input().split())

a = [int(i) * -1 for i in input().split()]

heapq.heapify(a)

for i in range(m):
    minPrice = heapq.heappop(a)
    # 負の切捨てが面倒なので正の値にしてからまた負に戻す
    minPrice = -(abs(minPrice) // 2)
    heapq.heappush(a, minPrice)

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(i) * -1 for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) * -1 int(i) int i -1 a = [int(i) * -1 for i in input().split()] a [int(i) * -1 for i in input().split()] heapq.heapify(a) heapq.heapify heapq heapify a for i in range(m):
    minPrice = heapq.heappop(a)
    # 負の切捨てが面倒なので正の値にしてからまた負に戻す
    minPrice = -(abs(minPrice) // 2)
    heapq.heappush(a, minPrice) i range(m) range m minPrice = heapq.heappop(a) minPrice heapq.heappop(a) heapq.heappop heapq heappop a minPrice = -(abs(minPrice) // 2) minPrice -(abs(minPrice) // 2) abs(minPrice) // 2 abs(minPrice) abs minPrice 2 heapq.heappush(a, minPrice) heapq.heappush heapq heappush a minPrice 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(i) * -1 for i in input().split()] [int(i) * -1 for i in input().split()] a minPrice = -(abs(minPrice) // 2) -(abs(minPrice) // 2) minPrice minPrice = heapq.heappop(a) heapq.heappop(a) minPrice
# 優先度付キューのimport
import heapq

n, m = map(int, input().split())

a = [int(i) * -1 for i in input().split()]

heapq.heapify(a)

for i in range(m):
    minPrice = heapq.heappop(a)
    # 負の切捨てが面倒なので正の値にしてからまた負に戻す
    minPrice = -(abs(minPrice) // 2)
    heapq.heappush(a, minPrice)

print(-sum(a))