function down(a,b){
    return b-a;
}

function main(input){
    input = input.split('\n');
    inputA = input[0].split(' ');
    inputN = parseInt(inputA[0]);
    inputK = parseInt(inputA[1]);
    inputH = input[1].split(' ');
    enemy = Array(inputN);
    out = 0;

    for(i=0;i<inputN;i++){
        enemy[i]=parseInt(inputH[i]);
    }
    
    enemy = enemy.sort(down);

    for(i=inputK;i<inputN;i++){
        out=out + enemy[i];
    }

    console.log(out);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));