object Main {
  def main(args:Array[String]) {
    val read1 = readLine()
    val N = read1.split(' ')(0).toInt
    val K = read1.split(' ')(1).toInt
    val H = readLine().split(' ').map(_.toLong)

    var sort = H.sorted.reverse
    val ans = sort.drop(K).sum
    
    println(ans)

  }
}
