import heapq
N, M = map(int, input().split())
A = list(map(int, input().split()))
for i in range(N):
  A[i] = -A[i]
heapq.heapify(A)
for _ in range(M):
  a = -heapq.heappop(A)
  a = (a//2) * -1
  heapq.heappush(A, a)
print(sum(A)*-1) 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 for i in range(N):
  A[i] = -A[i] i range(N) range N A[i] = -A[i] A[i] A i -A[i] A[i] A i heapq.heapify(A) heapq.heapify heapq heapify A for _ in range(M):
  a = -heapq.heappop(A)
  a = (a//2) * -1
  heapq.heappush(A, a) _ range(M) range M a = -heapq.heappop(A) a -heapq.heappop(A) heapq.heappop(A) heapq.heappop heapq heappop A a = (a//2) * -1 a (a//2) * -1 a//2 a 2 -1 heapq.heappush(A, a) heapq.heappush heapq heappush A a print(sum(A)*-1) print sum(A)*-1 sum(A) sum A -1 M = map(int, input().split()) map(int, input().split()) M a = (a//2) * -1 (a//2) * -1 a A = list(map(int, input().split())) list(map(int, input().split())) A a = -heapq.heappop(A) -heapq.heappop(A) a N, M = map(int, input().split()) map(int, input().split()) N
import heapq
N, M = map(int, input().split())
A = list(map(int, input().split()))
for i in range(N):
  A[i] = -A[i]
heapq.heapify(A)
for _ in range(M):
  a = -heapq.heappop(A)
  a = (a//2) * -1
  heapq.heappush(A, a)
print(sum(A)*-1)