import scala.io.StdIn.readLine

object Main extends App {

  val Array(n, k) = readLine().split(" ").map(_.toInt)
  val xs = readLine().split(" ").map(_.toLong)
  val ys = xs.sortWith(_ > _).drop(k)
  println(ys.sum)
}