from heapq import *

n,m=map(int,input().split())
a=list(map(lambda x:int(x)*-1,input().split()))

heapify(a)

for i in range(m):
    x=heappop(a)
    x*=-1
    x//=2
    x*=-1
    heappush(a,x)


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

n,m=map(int,input().split())
a=list(map(lambda x:int(x)*-1,input().split()))

heapify(a)

for i in range(m):
    x=heappop(a)
    x*=-1
    x//=2
    x*=-1
    heappush(a,x)


print(sum(a)*-1)