import heapq
n,m = map(int,input().split())
a = [(-1)*int(i) for i in input().split()]
heapq.heapify(a)
while m >= 1:
	k = heapq.heappop(a)
	k *= -1
	k //= 2
	k *= -1
	heapq.heappush(a, k)
	m -= 1
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 (-1)*int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() (-1)*int(i) -1 int(i) int i a = [(-1)*int(i) for i in input().split()] a [(-1)*int(i) for i in input().split()] heapq.heapify(a) heapq.heapify heapq heapify a while m >= 1:
	k = heapq.heappop(a)
	k *= -1
	k //= 2
	k *= -1
	heapq.heappush(a, k)
	m -= 1 m >= 1 m 1 k = heapq.heappop(a) k heapq.heappop(a) heapq.heappop heapq heappop a k *= -1 k -1 k //= 2 k 2 k *= -1 k -1 heapq.heappush(a, k) heapq.heappush heapq heappush a k m -= 1 m 1 print(-sum(a)) print -sum(a) sum(a) sum a n,m = map(int,input().split()) map(int,input().split()) n k = heapq.heappop(a) heapq.heappop(a) k m -= 1 1 m k *= -1 -1 k m = map(int,input().split()) map(int,input().split()) m a = [(-1)*int(i) for i in input().split()] [(-1)*int(i) for i in input().split()] a k *= -1 -1 k k //= 2 2 k
import heapq
n,m = map(int,input().split())
a = [(-1)*int(i) for i in input().split()]
heapq.heapify(a)
while m >= 1:
	k = heapq.heappop(a)
	k *= -1
	k //= 2
	k *= -1
	heapq.heappush(a, k)
	m -= 1
print(-sum(a))