import heapq

n, m = map(int,input().split())
hp = map(lambda x: (-1)*int(x), input().split())
hp = list(hp)
heapq.heapify(hp)

for i in range(m):
  item = -1*heapq.heappop(hp)
  # print('item',item)
  item = item //2
  heapq.heappush(hp, -item)
  
print(-1*sum(hp)) import heapq heapq n, m = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m hp = map(lambda x: (-1)*int(x), input().split()) hp 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 hp = list(hp) hp list(hp) list hp heapq.heapify(hp) heapq.heapify heapq heapify hp for i in range(m):
  item = -1*heapq.heappop(hp)
  # print('item',item)
  item = item //2
  heapq.heappush(hp, -item)
   i range(m) range m item = -1*heapq.heappop(hp) item -1*heapq.heappop(hp) -1 heapq.heappop(hp) heapq.heappop heapq heappop hp item = item //2 item item //2 item 2 heapq.heappush(hp, -item) heapq.heappush heapq heappush hp -item item print(-1*sum(hp)) print -1*sum(hp) -1 sum(hp) sum hp item = item //2 item //2 item hp = map(lambda x: (-1)*int(x), input().split()) map(lambda x: (-1)*int(x), input().split()) hp m = map(int,input().split()) map(int,input().split()) m hp = list(hp) list(hp) hp item = -1*heapq.heappop(hp) -1*heapq.heappop(hp) item n, m = map(int,input().split()) map(int,input().split()) n
import heapq

n, m = map(int,input().split())
hp = map(lambda x: (-1)*int(x), input().split())
hp = list(hp)
heapq.heapify(hp)

for i in range(m):
  item = -1*heapq.heappop(hp)
  # print('item',item)
  item = item //2
  heapq.heappush(hp, -item)
  
print(-1*sum(hp))