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