import heapq
N, M =map(int, input().split())
A=list(map(lambda x: int(x)*(-1), input().split())) #各要素を-1倍
heapq.heapify(A) #Aを優先度付きキューに

for _ in range(M):
	temp_min=heapq.heappop(A)
	heapq.heappush(A, (-1)*(temp_min*(-1)//2))
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)*(-1), input().split())) A list(map(lambda x: int(x)*(-1), input().split())) list map(lambda x: int(x)*(-1), input().split()) map lambda x: int(x)*(-1) int(x)*(-1) int(x) int x -1 x input().split() ().split () input split heapq.heapify(A) heapq.heapify heapq heapify A for _ in range(M):
	temp_min=heapq.heappop(A)
	heapq.heappush(A, (-1)*(temp_min*(-1)//2)) _ range(M) range M temp_min=heapq.heappop(A) temp_min heapq.heappop(A) heapq.heappop heapq heappop A heapq.heappush(A, (-1)*(temp_min*(-1)//2)) heapq.heappush heapq heappush A (-1)*(temp_min*(-1)//2) -1 temp_min*(-1)//2 temp_min*(-1) temp_min -1 2 print(-sum(A)) print -sum(A) sum(A) sum A N, M =map(int, input().split()) map(int, input().split()) N temp_min=heapq.heappop(A) heapq.heappop(A) temp_min M =map(int, input().split()) map(int, input().split()) M A=list(map(lambda x: int(x)*(-1), input().split())) list(map(lambda x: int(x)*(-1), input().split())) A
import heapq
N, M =map(int, input().split())
A=list(map(lambda x: int(x)*(-1), input().split())) #各要素を-1倍
heapq.heapify(A) #Aを優先度付きキューに

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