import heapq as hp
n,m=map(int,input().split())
a=[-int(x) for x in input().rstrip().split()]

hp.heapify(a)
for i in range(m):
    
    now=hp.heappop(a)
    now=-now//2
    hp.heappush(a,-now)

print(-sum(a)) import heapq as hp heapq n,m=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split m -int(x) for x in input().rstrip().split() for x in input().rstrip().split() x input().rstrip().split() ().rstrip().split ().rstrip() ().rstrip () input rstrip split for x in input().rstrip().split() -int(x) int(x) int x a=[-int(x) for x in input().rstrip().split()] a [-int(x) for x in input().rstrip().split()] hp.heapify(a) hp.heapify hp heapify a for i in range(m):
    
    now=hp.heappop(a)
    now=-now//2
    hp.heappush(a,-now) i range(m) range m now=hp.heappop(a) now hp.heappop(a) hp.heappop hp heappop a now=-now//2 now -now//2 -now now 2 hp.heappush(a,-now) hp.heappush hp heappush a -now now print(-sum(a)) print -sum(a) sum(a) sum a m=map(int,input().split()) map(int,input().split()) m a=[-int(x) for x in input().rstrip().split()] [-int(x) for x in input().rstrip().split()] a n,m=map(int,input().split()) map(int,input().split()) n now=-now//2 -now//2 now now=hp.heappop(a) hp.heappop(a) now
import heapq as hp
n,m=map(int,input().split())
a=[-int(x) for x in input().rstrip().split()]

hp.heapify(a)
for i in range(m):
    
    now=hp.heappop(a)
    now=-now//2
    hp.heappush(a,-now)

print(-sum(a))