n, m = gets.chomp.split(' ').map(&:to_i)
a = gets.chomp.split(' ').map(&:to_i).sort
raise 'NO' unless n == a.size
sum = 0
m.times do
  tmp = a.pop
  tmp = tmp >> 1
  index = a.bsearch_index {|x| x >= tmp} || a.size
  if index == 0
    sum += tmp
  else
    a.insert(index, tmp)
  end
end
a.each do |point|
  sum += point
end
puts sum