import heapq
N, M = map(int, input().split())
A = list(map(int, input().split()))
ls = []
for item in A:
  heapq.heappush(ls, -item)
for m in range(M):
  tmp = -heapq.heappop(ls)
  tmp = tmp // 2
  heapq.heappush(ls, -tmp)
print(-sum(ls)) 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(int, input().split())) A list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split ls = [] ls [] for item in A:
  heapq.heappush(ls, -item) item A heapq.heappush(ls, -item) heapq.heappush heapq heappush ls -item item for m in range(M):
  tmp = -heapq.heappop(ls)
  tmp = tmp // 2
  heapq.heappush(ls, -tmp) m range(M) range M tmp = -heapq.heappop(ls) tmp -heapq.heappop(ls) heapq.heappop(ls) heapq.heappop heapq heappop ls tmp = tmp // 2 tmp tmp // 2 tmp 2 heapq.heappush(ls, -tmp) heapq.heappush heapq heappush ls -tmp tmp print(-sum(ls)) print -sum(ls) sum(ls) sum ls N, M = map(int, input().split()) map(int, input().split()) N A = list(map(int, input().split())) list(map(int, input().split())) A ls = [] [] ls tmp = tmp // 2 tmp // 2 tmp tmp = -heapq.heappop(ls) -heapq.heappop(ls) tmp M = map(int, input().split()) map(int, input().split()) M
import heapq
N, M = map(int, input().split())
A = list(map(int, input().split()))
ls = []
for item in A:
  heapq.heappush(ls, -item)
for m in range(M):
  tmp = -heapq.heappop(ls)
  tmp = tmp // 2
  heapq.heappush(ls, -tmp)
print(-sum(ls))
