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