N,M=gets.split.map(&:to_i)
a=gets.split.map(&:to_i).sort

#N,M=10**5,10**5
#a=N.times.map{rand(1..10**9)}

M.times do
  x = a.pop
  x /= 2
  index = a.bsearch_index{|num| num > x } || -1
  a.insert(index, x)
end
p a.inject(:+)
