from heapq import *
n,m=map(int,input().split())
a=list(map(int,input().split()))
a=list(map(lambda x:x*(-1),a))
heapify(a)
for i in range(m):
    t=heappop(a)
    heappush(a,int(t/2))
print(-1*sum(a)) from heapq import * 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 a=list(map(lambda x:x*(-1),a)) a list(map(lambda x:x*(-1),a)) list map(lambda x:x*(-1),a) map lambda x:x*(-1) x*(-1) x -1 x a heapify(a) heapify a for i in range(m):
    t=heappop(a)
    heappush(a,int(t/2)) i range(m) range m t=heappop(a) t heappop(a) heappop a heappush(a,int(t/2)) heappush a int(t/2) int t/2 t 2 print(-1*sum(a)) print -1*sum(a) -1 sum(a) sum a m=map(int,input().split()) map(int,input().split()) m t=heappop(a) heappop(a) t n,m=map(int,input().split()) map(int,input().split()) n a=list(map(int,input().split())) list(map(int,input().split())) a a=list(map(lambda x:x*(-1),a)) list(map(lambda x:x*(-1),a)) a
from heapq import *
n,m=map(int,input().split())
a=list(map(int,input().split()))
a=list(map(lambda x:x*(-1),a))
heapify(a)
for i in range(m):
    t=heappop(a)
    heappush(a,int(t/2))
print(-1*sum(a))