import heapq
import math
n,m=map(int, input().split())
hp=list(map(lambda x:-1*int(x), input().split()))
heapq.heapify(hp)
for _ in range(m):
  item=heapq.heappop(hp)
  heapq.heappush(hp, math.ceil(item/2))
  
print(sum(hp)*-1) import heapq heapq import math math n,m=map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split m hp=list(map(lambda x:-1*int(x), input().split())) hp list(map(lambda x:-1*int(x), input().split())) list map(lambda x:-1*int(x), input().split()) map lambda x:-1*int(x) -1*int(x) -1 int(x) int x x input().split() ().split () input split heapq.heapify(hp) heapq.heapify heapq heapify hp for _ in range(m):
  item=heapq.heappop(hp)
  heapq.heappush(hp, math.ceil(item/2))
   _ range(m) range m item=heapq.heappop(hp) item heapq.heappop(hp) heapq.heappop heapq heappop hp heapq.heappush(hp, math.ceil(item/2)) heapq.heappush heapq heappush hp math.ceil(item/2) math.ceil math ceil item/2 item 2 print(sum(hp)*-1) print sum(hp)*-1 sum(hp) sum hp -1 m=map(int, input().split()) map(int, input().split()) m item=heapq.heappop(hp) heapq.heappop(hp) item hp=list(map(lambda x:-1*int(x), input().split())) list(map(lambda x:-1*int(x), input().split())) hp n,m=map(int, input().split()) map(int, input().split()) n
import heapq
import math
n,m=map(int, input().split())
hp=list(map(lambda x:-1*int(x), input().split()))
heapq.heapify(hp)
for _ in range(m):
  item=heapq.heappop(hp)
  heapq.heappush(hp, math.ceil(item/2))
  
print(sum(hp)*-1)
