import heapq
n,m = map(int, input().split())
A = list(map(int, input().split()))
A = list(map(lambda x: x*(-1), A))
heapq.heapify(A)

while m > 0:
    x = heapq.heappop(A)*(-1)
    x //= 2
    A.append(-x)
    m -= 1
print(abs(sum(list(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 A = list(map(lambda x: x*(-1), A)) A list(map(lambda x: x*(-1), A)) list map(lambda x: x*(-1), A) map lambda x: x*(-1) x*(-1) x -1 x A heapq.heapify(A) heapq.heapify heapq heapify A while m > 0:
    x = heapq.heappop(A)*(-1)
    x //= 2
    A.append(-x)
    m -= 1 m > 0 m 0 x = heapq.heappop(A)*(-1) x heapq.heappop(A)*(-1) heapq.heappop(A) heapq.heappop heapq heappop A -1 x //= 2 x 2 A.append(-x) A.append A append -x x m -= 1 m 1 print(abs(sum(list(A)))) print abs(sum(list(A))) abs sum(list(A)) sum list(A) list A A = list(map(int, input().split())) list(map(int, input().split())) A x = heapq.heappop(A)*(-1) heapq.heappop(A)*(-1) x A = list(map(lambda x: x*(-1), A)) list(map(lambda x: x*(-1), A)) A m = map(int, input().split()) map(int, input().split()) m x //= 2 2 x m -= 1 1 m n,m = map(int, input().split()) map(int, input().split()) n
import heapq
n,m = map(int, input().split())
A = list(map(int, input().split()))
A = list(map(lambda x: x*(-1), A))
heapq.heapify(A)

while m > 0:
    x = heapq.heappop(A)*(-1)
    x //= 2
    A.append(-x)
    m -= 1
print(abs(sum(list(A))))