N,M = map(int,input().split())
A = list(map(int,input().split()))
import heapq
B = []
for a in A:
    B.append(-a)
heapq.heapify(B)
for i in range(M):
    a = heapq.heappop(B)
    a = (-a)//2
    a = -a
    heapq.heappush(B,a)
print(-sum(B)) N,M = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split M A = list(map(int,input().split())) A list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split import heapq heapq B = [] B [] for a in A:
    B.append(-a) a A B.append(-a) B.append B append -a a heapq.heapify(B) heapq.heapify heapq heapify B for i in range(M):
    a = heapq.heappop(B)
    a = (-a)//2
    a = -a
    heapq.heappush(B,a) i range(M) range M a = heapq.heappop(B) a heapq.heappop(B) heapq.heappop heapq heappop B a = (-a)//2 a (-a)//2 -a a 2 a = -a a -a a heapq.heappush(B,a) heapq.heappush heapq heappush B a print(-sum(B)) print -sum(B) sum(B) sum B A = list(map(int,input().split())) list(map(int,input().split())) A a = (-a)//2 (-a)//2 a N,M = map(int,input().split()) map(int,input().split()) N a = -a -a a B = [] [] B a = heapq.heappop(B) heapq.heappop(B) a M = map(int,input().split()) map(int,input().split()) M
N,M = map(int,input().split())
A = list(map(int,input().split()))
import heapq
B = []
for a in A:
    B.append(-a)
heapq.heapify(B)
for i in range(M):
    a = heapq.heappop(B)
    a = (-a)//2
    a = -a
    heapq.heappush(B,a)
print(-sum(B))