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