import math
import sys
from collections import deque
import heapq
import copy
import itertools
from itertools import permutations
def mi() : return map(int,sys.stdin.readline().split())
def ii() : return int(sys.stdin.readline().rstrip())
def i() : return sys.stdin.readline().rstrip()
a,b=mi()
l=list(mi())
l=list(map(lambda x: x*-1 , l))
heapq.heapify(l)
for i in range(b):
  s=heapq.heappop(l)
  s=(-1)*(((-1)*s)//2)
  heapq.heappush(l,s)
ans=0
for i in range(a):
  d=heapq.heappop(l)
  ans+=(-1)*d
print(ans) import math math import sys sys from collections import deque import heapq heapq import copy copy import itertools itertools from itertools import permutations def mi() : return map(int,sys.stdin.readline().split()) mi def ii() : return int(sys.stdin.readline().rstrip()) ii def i() : return sys.stdin.readline().rstrip() i a,b=mi() a mi() mi b l=list(mi()) l list(mi()) list mi() mi l=list(map(lambda x: x*-1 , l)) l list(map(lambda x: x*-1 , l)) list map(lambda x: x*-1 , l) map lambda x: x*-1 x*-1 x -1 x l heapq.heapify(l) heapq.heapify heapq heapify l for i in range(b):
  s=heapq.heappop(l)
  s=(-1)*(((-1)*s)//2)
  heapq.heappush(l,s) i range(b) range b s=heapq.heappop(l) s heapq.heappop(l) heapq.heappop heapq heappop l s=(-1)*(((-1)*s)//2) s (-1)*(((-1)*s)//2) -1 ((-1)*s)//2 (-1)*s -1 s 2 heapq.heappush(l,s) heapq.heappush heapq heappush l s ans=0 ans 0 for i in range(a):
  d=heapq.heappop(l)
  ans+=(-1)*d i range(a) range a d=heapq.heappop(l) d heapq.heappop(l) heapq.heappop heapq heappop l ans+=(-1)*d ans (-1)*d -1 d print(ans) print ans s=(-1)*(((-1)*s)//2) (-1)*(((-1)*s)//2) s ans=0 0 ans def i() : return sys.stdin.readline().rstrip() def i() : return sys.stdin.readline().rstrip() i s=heapq.heappop(l) heapq.heappop(l) s def ii() : return int(sys.stdin.readline().rstrip()) def ii() : return int(sys.stdin.readline().rstrip()) ii def mi() : return map(int,sys.stdin.readline().split()) def mi() : return map(int,sys.stdin.readline().split()) mi l=list(mi()) list(mi()) l ans+=(-1)*d (-1)*d ans a,b=mi() mi() a l=list(map(lambda x: x*-1 , l)) list(map(lambda x: x*-1 , l)) l d=heapq.heappop(l) heapq.heappop(l) d b=mi() mi() b
import math
import sys
from collections import deque
import heapq
import copy
import itertools
from itertools import permutations
def mi() : return map(int,sys.stdin.readline().split())
def ii() : return int(sys.stdin.readline().rstrip())
def i() : return sys.stdin.readline().rstrip()
a,b=mi()
l=list(mi())
l=list(map(lambda x: x*-1 , l))
heapq.heapify(l)
for i in range(b):
  s=heapq.heappop(l)
  s=(-1)*(((-1)*s)//2)
  heapq.heappush(l,s)
ans=0
for i in range(a):
  d=heapq.heappop(l)
  ans+=(-1)*d
print(ans)