N, M = gets.chomp.split(' ').map(&:to_i)
prices = gets.chomp.split(' ').map(&:to_i)

M.times do
  max = prices.max
  index = prices.index(max)

  prices[index] = prices[index] / 2
end

puts prices.inject(:+)
