import heapq

N, M = [int(x) for x in input().split()]
A = list([int(x) * - 1 for x in input().split()])
heapq.heapify(A)

for _ in range(M):
    target = heapq.heappop(A) * -1
    heapq.heappush(A, (target // 2) * -1)

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

N, M = [int(x) for x in input().split()]
A = list([int(x) * - 1 for x in input().split()])
heapq.heapify(A)

for _ in range(M):
    target = heapq.heappop(A) * -1
    heapq.heappush(A, (target // 2) * -1)

print(sum(A) * -1)
