import heapq
 
N,M = map(int,input().split())
Price_List = list(map(lambda x:x*(-1),map(int,input().split())))
heapq.heapify(Price_List)
for i in range(M):
    val = heapq.heappop(Price_List)* -1 // 2 * -1
    heapq.heappush(Price_List,val)
print(-sum(Price_List)) import heapq heapq N,M = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split M Price_List = list(map(lambda x:x*(-1),map(int,input().split()))) Price_List list(map(lambda x:x*(-1),map(int,input().split()))) list map(lambda x:x*(-1),map(int,input().split())) map lambda x:x*(-1) x*(-1) x -1 x map(int,input().split()) map int input().split() ().split () input split heapq.heapify(Price_List) heapq.heapify heapq heapify Price_List for i in range(M):
    val = heapq.heappop(Price_List)* -1 // 2 * -1
    heapq.heappush(Price_List,val) i range(M) range M val = heapq.heappop(Price_List)* -1 // 2 * -1 val heapq.heappop(Price_List)* -1 // 2 * -1 heapq.heappop(Price_List)* -1 // 2 heapq.heappop(Price_List)* -1 heapq.heappop(Price_List) heapq.heappop heapq heappop Price_List -1 2 -1 heapq.heappush(Price_List,val) heapq.heappush heapq heappush Price_List val print(-sum(Price_List)) print -sum(Price_List) sum(Price_List) sum Price_List M = map(int,input().split()) map(int,input().split()) M Price_List = list(map(lambda x:x*(-1),map(int,input().split()))) list(map(lambda x:x*(-1),map(int,input().split()))) Price_List val = heapq.heappop(Price_List)* -1 // 2 * -1 heapq.heappop(Price_List)* -1 // 2 * -1 val N,M = map(int,input().split()) map(int,input().split()) N
import heapq
 
N,M = map(int,input().split())
Price_List = list(map(lambda x:x*(-1),map(int,input().split())))
heapq.heapify(Price_List)
for i in range(M):
    val = heapq.heappop(Price_List)* -1 // 2 * -1
    heapq.heappush(Price_List,val)
print(-sum(Price_List))
