n,m = gets.split.map(&:to_i)
ary = gets.split.map{|i| 1.0 * i.to_i}
ary.sort!.reverse!
m.times do 
  ary[0] = ary[0] / 2
  (1..n-1).each do |i|
    if ary[0] > ary[i]

      ary.insert(i,ary[0])
      ary.delete_at(0)
      break
    end
  end
end


result = 0
n.times do |i|
  result += ary[i].floor
end
puts result