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