import heapq

n,m=map(int,input().split())
a=[-int(x) for x in input().split()]
heapq.heapify(a)
for i in range(m):
  t=heapq.heappop(a)
  t=-t//2
  heapq.heappush(a,-t)
print(-sum(a)) import heapq heapq n,m=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m -int(x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() -int(x) int(x) int x a=[-int(x) for x in input().split()] a [-int(x) for x in input().split()] heapq.heapify(a) heapq.heapify heapq heapify a for i in range(m):
  t=heapq.heappop(a)
  t=-t//2
  heapq.heappush(a,-t) i range(m) range m t=heapq.heappop(a) t heapq.heappop(a) heapq.heappop heapq heappop a t=-t//2 t -t//2 -t t 2 heapq.heappush(a,-t) heapq.heappush heapq heappush a -t t print(-sum(a)) print -sum(a) sum(a) sum a t=-t//2 -t//2 t m=map(int,input().split()) map(int,input().split()) m n,m=map(int,input().split()) map(int,input().split()) n a=[-int(x) for x in input().split()] [-int(x) for x in input().split()] a t=heapq.heappop(a) heapq.heappop(a) t
import heapq

n,m=map(int,input().split())
a=[-int(x) for x in input().split()]
heapq.heapify(a)
for i in range(m):
  t=heapq.heappop(a)
  t=-t//2
  heapq.heappush(a,-t)
print(-sum(a))
