from heapq import heapify, heappop, heappush
n, m = map(int, input().split())
list_A = list(map(int, input().split()))
for i in range(n):
    list_A[i] = (-1)*list_A[i]
heapify(list_A)
for _ in range(m):
    a = heappop(list_A)*(-1)
    a //= 2
    a *= (-1)
    heappush(list_A, a)

print((-1)*sum(list_A)) from heapq import heapify, heappop, heappush n, m = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m list_A = list(map(int, input().split())) list_A list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split for i in range(n):
    list_A[i] = (-1)*list_A[i] i range(n) range n list_A[i] = (-1)*list_A[i] list_A[i] list_A i (-1)*list_A[i] -1 list_A[i] list_A i heapify(list_A) heapify list_A for _ in range(m):
    a = heappop(list_A)*(-1)
    a //= 2
    a *= (-1)
    heappush(list_A, a) _ range(m) range m a = heappop(list_A)*(-1) a heappop(list_A)*(-1) heappop(list_A) heappop list_A -1 a //= 2 a 2 a *= (-1) a -1 heappush(list_A, a) heappush list_A a print((-1)*sum(list_A)) print (-1)*sum(list_A) -1 sum(list_A) sum list_A list_A = list(map(int, input().split())) list(map(int, input().split())) list_A a *= (-1) -1 a n, m = map(int, input().split()) map(int, input().split()) n m = map(int, input().split()) map(int, input().split()) m a //= 2 2 a a = heappop(list_A)*(-1) heappop(list_A)*(-1) a
from heapq import heapify, heappop, heappush
n, m = map(int, input().split())
list_A = list(map(int, input().split()))
for i in range(n):
    list_A[i] = (-1)*list_A[i]
heapify(list_A)
for _ in range(m):
    a = heappop(list_A)*(-1)
    a //= 2
    a *= (-1)
    heappush(list_A, a)

print((-1)*sum(list_A))