import bisect
 
N,M = map(int,input().split())
Price_List = list(map(int,input().split()))
Price_List.sort()
for i in range(M):
    New_Price = Price_List.pop(-1)//2
    Price_List.insert(bisect.bisect(Price_List,New_Price),New_Price)
print(sum(Price_List)) import bisect bisect N,M = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split M Price_List = list(map(int,input().split())) Price_List list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split Price_List.sort() Price_List.sort Price_List sort for i in range(M):
    New_Price = Price_List.pop(-1)//2
    Price_List.insert(bisect.bisect(Price_List,New_Price),New_Price) i range(M) range M New_Price = Price_List.pop(-1)//2 New_Price Price_List.pop(-1)//2 Price_List.pop(-1) Price_List.pop Price_List pop -1 2 Price_List.insert(bisect.bisect(Price_List,New_Price),New_Price) Price_List.insert Price_List insert bisect.bisect(Price_List,New_Price) bisect.bisect bisect bisect Price_List New_Price New_Price print(sum(Price_List)) print sum(Price_List) sum Price_List New_Price = Price_List.pop(-1)//2 Price_List.pop(-1)//2 New_Price N,M = map(int,input().split()) map(int,input().split()) N Price_List = list(map(int,input().split())) list(map(int,input().split())) Price_List M = map(int,input().split()) map(int,input().split()) M
import bisect
 
N,M = map(int,input().split())
Price_List = list(map(int,input().split()))
Price_List.sort()
for i in range(M):
    New_Price = Price_List.pop(-1)//2
    Price_List.insert(bisect.bisect(Price_List,New_Price),New_Price)
print(sum(Price_List))