N,M=map(int,input().split())
*A,=map(int,input().split())
A=sorted(A)

while M:
    A[-1]//=2
    M-=1
    i=-2
    while M and (-N<=i and A[i]>=A[-1]):
        A[i]//=2
        M-=1
        i-=1
    A.sort()

print(sum(A)) 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 A=sorted(A) A sorted(A) sorted A while M:
    A[-1]//=2
    M-=1
    i=-2
    while M and (-N<=i and A[i]>=A[-1]):
        A[i]//=2
        M-=1
        i-=1
    A.sort() M A[-1]//=2 A[-1] A -1 2 M-=1 M 1 i=-2 i -2 while M and (-N<=i and A[i]>=A[-1]):
        A[i]//=2
        M-=1
        i-=1
     M and (-N<=i and A[i]>=A[-1]) M -N<=i and A[i]>=A[-1] -N<=i -N N i A[i]>=A[-1] A[i] A i A[-1] A -1 A[i]//=2 A[i] A i 2 M-=1 M 1 i-=1 i 1 A.sort() A.sort A sort print(sum(A)) print sum(A) sum A M=map(int,input().split()) map(int,input().split()) M M-=1 1 M N,M=map(int,input().split()) map(int,input().split()) N M-=1 1 M i=-2 -2 i i-=1 1 i A=sorted(A) sorted(A) A
N,M=map(int,input().split())
*A,=map(int,input().split())
A=sorted(A)

while M:
    A[-1]//=2
    M-=1
    i=-2
    while M and (-N<=i and A[i]>=A[-1]):
        A[i]//=2
        M-=1
        i-=1
    A.sort()

print(sum(A))