import heapq
N, M = map(int, input().split())
A = list(map(lambda x: -int(x), input().split()))
heapq.heapify(A)

ans = 0
for i in range(M):
    most_expensive = -heapq.heappop(A)
    most_expensive //= 2
    heapq.heappush(A, -most_expensive)

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 A = list(map(lambda x: -int(x), input().split())) A list(map(lambda x: -int(x), input().split())) list map(lambda x: -int(x), input().split()) map lambda x: -int(x) -int(x) int(x) int x x input().split() ().split () input split heapq.heapify(A) heapq.heapify heapq heapify A ans = 0 ans 0 for i in range(M):
    most_expensive = -heapq.heappop(A)
    most_expensive //= 2
    heapq.heappush(A, -most_expensive) i range(M) range M most_expensive = -heapq.heappop(A) most_expensive -heapq.heappop(A) heapq.heappop(A) heapq.heappop heapq heappop A most_expensive //= 2 most_expensive 2 heapq.heappush(A, -most_expensive) heapq.heappush heapq heappush A -most_expensive most_expensive print(-sum(A)) print -sum(A) sum(A) sum A N, M = map(int, input().split()) map(int, input().split()) N A = list(map(lambda x: -int(x), input().split())) list(map(lambda x: -int(x), input().split())) A most_expensive = -heapq.heappop(A) -heapq.heappop(A) most_expensive M = map(int, input().split()) map(int, input().split()) M ans = 0 0 ans most_expensive //= 2 2 most_expensive
import heapq
N, M = map(int, input().split())
A = list(map(lambda x: -int(x), input().split()))
heapq.heapify(A)

ans = 0
for i in range(M):
    most_expensive = -heapq.heappop(A)
    most_expensive //= 2
    heapq.heappush(A, -most_expensive)

print(-sum(A))
