from math import ceil,floor,comb,factorial,gcd,pow,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

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

heapify(a)
while m > 0:
    m -= 1
    heappush(a, (-1)*(-heappop(a)//2))
print(-sum(a)) from math import ceil,floor,comb,factorial,gcd,pow,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf from itertools import accumulate,permutations,combinations,product,combinations_with_replacement from collections import deque,defaultdict,Counter from bisect import bisect_left,bisect_right from operator import itemgetter from heapq import heapify,heappop,heappush from copy import deepcopy from time import time import string string import sys sys sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 def input() : return sys.stdin.readline().strip() input def INT()   : return int(input()) INT def MAP()   : return map(int,input().split()) MAP def LIST()  : return list(MAP()) LIST n, m = MAP() n MAP() MAP 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 while m > 0:
    m -= 1
    heappush(a, (-1)*(-heappop(a)//2)) m > 0 m 0 m -= 1 m 1 heappush(a, (-1)*(-heappop(a)//2)) heappush a (-1)*(-heappop(a)//2) -1 -heappop(a)//2 -heappop(a) heappop(a) heappop a 2 print(-sum(a)) print -sum(a) sum(a) sum a def LIST()  : return list(MAP()) def LIST()  : return list(MAP()) LIST def MAP()   : return map(int,input().split()) def MAP()   : return map(int,input().split()) MAP def INT()   : return int(input()) def INT()   : return int(input()) INT def input() : return sys.stdin.readline().strip() def input() : return sys.stdin.readline().strip() input a = list(map(lambda x:int(x)*(-1), input().split())) list(map(lambda x:int(x)*(-1), input().split())) a m -= 1 1 m m = MAP() MAP() m n, m = MAP() MAP() n
from math import ceil,floor,comb,factorial,gcd,pow,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

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

heapify(a)
while m > 0:
    m -= 1
    heappush(a, (-1)*(-heappop(a)//2))
print(-sum(a))