import heapq

def readinput():
    n,m=list(map(int,input().split()))
    a=list(map(int,input().split()))
    return n,m,a

def main(n,m,a):
    #print(a)
    hq=[]
    for i in a:
        heapq.heappush(hq,-i)
    #print(hq)
    for i in range(m):
        a=(-heapq.heappop(hq))//2
        heapq.heappush(hq,-a)
        #print(hq)

    sum=0
    for i in hq:
        sum+=i
    
    return -sum

if __name__=='__main__':
    n,m,a=readinput()
    ans=main(n,m,a)
    print(ans) import heapq heapq def readinput():
    n,m=list(map(int,input().split()))
    a=list(map(int,input().split()))
    return n,m,a readinput n,m=list(map(int,input().split())) n list(map(int,input().split())) list 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 return n,m,a return n,m,a n m a def main(n,m,a):
    #print(a)
    hq=[]
    for i in a:
        heapq.heappush(hq,-i)
    #print(hq)
    for i in range(m):
        a=(-heapq.heappop(hq))//2
        heapq.heappush(hq,-a)
        #print(hq)

    sum=0
    for i in hq:
        sum+=i
    
    return -sum main hq=[] hq [] for i in a:
        heapq.heappush(hq,-i)
    #print(hq)
     i a heapq.heappush(hq,-i) heapq.heappush heapq heappush hq -i i for i in range(m):
        a=(-heapq.heappop(hq))//2
        heapq.heappush(hq,-a)
        #print(hq)

     i range(m) range m a=(-heapq.heappop(hq))//2 a (-heapq.heappop(hq))//2 -heapq.heappop(hq) heapq.heappop(hq) heapq.heappop heapq heappop hq 2 heapq.heappush(hq,-a) heapq.heappush heapq heappush hq -a a sum=0 sum 0 for i in hq:
        sum+=i
    
     i hq sum+=i sum i return -sum -sum sum n n m m a a if __name__=='__main__':
    n,m,a=readinput()
    ans=main(n,m,a)
    print(ans) __name__=='__main__' __name__ '__main__' n,m,a=readinput() n readinput() readinput m a ans=main(n,m,a) ans main(n,m,a) main n m a print(ans) print ans n,m,a=readinput() readinput() n ans=main(n,m,a) main(n,m,a) ans def readinput():
    n,m=list(map(int,input().split()))
    a=list(map(int,input().split()))
    return n,m,a def readinput():
    n,m=list(map(int,input().split()))
    a=list(map(int,input().split()))
    return n,m,a readinput def main(n,m,a):
    #print(a)
    hq=[]
    for i in a:
        heapq.heappush(hq,-i)
    #print(hq)
    for i in range(m):
        a=(-heapq.heappop(hq))//2
        heapq.heappush(hq,-a)
        #print(hq)

    sum=0
    for i in hq:
        sum+=i
    
    return -sum def main(n,m,a):
    #print(a)
    hq=[]
    for i in a:
        heapq.heappush(hq,-i)
    #print(hq)
    for i in range(m):
        a=(-heapq.heappop(hq))//2
        heapq.heappush(hq,-a)
        #print(hq)

    sum=0
    for i in hq:
        sum+=i
    
    return -sum main m,a=readinput() readinput() m a=readinput() readinput() a
import heapq

def readinput():
    n,m=list(map(int,input().split()))
    a=list(map(int,input().split()))
    return n,m,a

def main(n,m,a):
    #print(a)
    hq=[]
    for i in a:
        heapq.heappush(hq,-i)
    #print(hq)
    for i in range(m):
        a=(-heapq.heappop(hq))//2
        heapq.heappush(hq,-a)
        #print(hq)

    sum=0
    for i in hq:
        sum+=i
    
    return -sum

if __name__=='__main__':
    n,m,a=readinput()
    ans=main(n,m,a)
    print(ans)
