from heapq import heappop,heappush

n,m=map(int,input().split())
a=list(map(int,input().split()))

h=[]
for l in a:
    heappush(h,-l) 
    
for i in range(m):
    amax=heappop(h)
    l=(-amax)//2
    heappush(h,-l)
    
print(-sum(h)) from heapq import heappop,heappush 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 h=[] h [] for l in a:
    heappush(h,-l) 
     l a heappush(h,-l) heappush h -l l for i in range(m):
    amax=heappop(h)
    l=(-amax)//2
    heappush(h,-l)
     i range(m) range m amax=heappop(h) amax heappop(h) heappop h l=(-amax)//2 l (-amax)//2 -amax amax 2 heappush(h,-l) heappush h -l l print(-sum(h)) print -sum(h) sum(h) sum h h=[] [] h n,m=map(int,input().split()) map(int,input().split()) n amax=heappop(h) heappop(h) amax a=list(map(int,input().split())) list(map(int,input().split())) a l=(-amax)//2 (-amax)//2 l m=map(int,input().split()) map(int,input().split()) m
from heapq import heappop,heappush

n,m=map(int,input().split())
a=list(map(int,input().split()))

h=[]
for l in a:
    heappush(h,-l) 
    
for i in range(m):
    amax=heappop(h)
    l=(-amax)//2
    heappush(h,-l)
    
print(-sum(h))
