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

for _ in range(M):
    tmp_min = heapq.heappop(al)
    heapq.heappush(al, -1*(-tmp_min//2))
print(-sum(al)) import heapq heapq N, M = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split M al = list(map(int,input().split())) al list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split al = list(map(lambda x: x*(-1), al)) al list(map(lambda x: x*(-1), al)) list map(lambda x: x*(-1), al) map lambda x: x*(-1) x*(-1) x -1 x al heapq.heapify(al) heapq.heapify heapq heapify al for _ in range(M):
    tmp_min = heapq.heappop(al)
    heapq.heappush(al, -1*(-tmp_min//2)) _ range(M) range M tmp_min = heapq.heappop(al) tmp_min heapq.heappop(al) heapq.heappop heapq heappop al heapq.heappush(al, -1*(-tmp_min//2)) heapq.heappush heapq heappush al -1*(-tmp_min//2) -1 -tmp_min//2 -tmp_min tmp_min 2 print(-sum(al)) print -sum(al) sum(al) sum al al = list(map(lambda x: x*(-1), al)) list(map(lambda x: x*(-1), al)) al al = list(map(int,input().split())) list(map(int,input().split())) al N, M = map(int,input().split()) map(int,input().split()) N tmp_min = heapq.heappop(al) heapq.heappop(al) tmp_min M = map(int,input().split()) map(int,input().split()) M
import heapq
N, M = map(int,input().split())
al = list(map(int,input().split()))
al = list(map(lambda x: x*(-1), al))
heapq.heapify(al)

for _ in range(M):
    tmp_min = heapq.heappop(al)
    heapq.heappush(al, -1*(-tmp_min//2))
print(-sum(al))