fun main(args: Array<String>) {
    val sc = java.util.Scanner(System.`in`)
    val n = sc.nextInt()
    var k = sc.nextInt()
    val h = sc.asSequence().take(n).map(String::toLong).toList().sortedDescending().drop(k).sum()

    print(h)
}
