fun main(args: Array<String>) {
    val a = readLine()!!.split(" ").map { it.toInt() }
    val h = readLine()!!.split(" ").map { it.toInt() }

    val spcl = a[1]
    val sort = h.sorted().reversed()

    val res = sort.drop(spcl).map { it.toLong() }
    println(res.sum())
}