// https://atcoder.jp/contests/abc153/tasks/abc153_c
import java.lang.Math.*
import java.util.*

fun main(args: Array<String>) {
    val scn = Scanner(System.`in`)
    val N = scn.nextInt()
    var K = scn.nextInt()

    if(N<K) K = N

    var H = mutableListOf<Double>()
    for(h in 1..N){
        H.add(scn.nextDouble())
    }

    H.sortDescending()
    for(k in 0..K-1){
        H[k] = 0.0
    }

    var sum = 0.0
    for(i in 0..N-1){
        sum += H[i]
    }

    println(String.format("%.0f",sum))
}