n, m = gets.split.map(&:to_i)
a = gets.split.map(&:to_i)

a.sort!

m.times do
  price = a[-1]
  discount_price = price / 2
  a.pop
  new_index = a.bsearch_index { |x| x >= discount_price }
  a.insert(new_index || 0, discount_price)
end

puts a.inject(:+)
