import heapq

N, M = [int(_) for _ in input().split()]
A = [int(_) * -1 for _ in input().split()]

heapq.heapify(A)
for i in range(M):
    a = heapq.heappop(A) * -1
    heapq.heappush(A, (-1)*(a//2))
print((-1) * sum(A)) import heapq heapq int(_) for _ in input().split() for _ in input().split() _ input().split() ().split () input split for _ in input().split() int(_) int _ N, M = [int(_) for _ in input().split()] N [int(_) for _ in input().split()] M int(_) * -1 for _ in input().split() for _ in input().split() _ input().split() ().split () input split for _ in input().split() int(_) * -1 int(_) int _ -1 A = [int(_) * -1 for _ in input().split()] A [int(_) * -1 for _ in input().split()] heapq.heapify(A) heapq.heapify heapq heapify A for i in range(M):
    a = heapq.heappop(A) * -1
    heapq.heappush(A, (-1)*(a//2)) i range(M) range M a = heapq.heappop(A) * -1 a heapq.heappop(A) * -1 heapq.heappop(A) heapq.heappop heapq heappop A -1 heapq.heappush(A, (-1)*(a//2)) heapq.heappush heapq heappush A (-1)*(a//2) -1 a//2 a 2 print((-1) * sum(A)) print (-1) * sum(A) -1 sum(A) sum A M = [int(_) for _ in input().split()] [int(_) for _ in input().split()] M A = [int(_) * -1 for _ in input().split()] [int(_) * -1 for _ in input().split()] A a = heapq.heappop(A) * -1 heapq.heappop(A) * -1 a N, M = [int(_) for _ in input().split()] [int(_) for _ in input().split()] N
import heapq

N, M = [int(_) for _ in input().split()]
A = [int(_) * -1 for _ in input().split()]

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