object Main extends App{
  val List(n,k) = readLine.split(" ").map(_.toInt).toList
  val h = readLine.split(" ").map(_.toLong).toList.sorted(Ordering[Long].reverse)
  
  val t = h.drop(k).sum
  
  println(t)
}