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

for _ in range(M):
  X = heapq.heappop(a)
  heapq.heappush(a, X/2)

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

for _ in range(M):
  X = heapq.heappop(a)
  heapq.heappush(a, X/2)

print(sum(int(-x) for x in a))