import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.PrintWriter;
import java.io.StreamTokenizer;
import java.util.Arrays;
import java.util.Scanner;


public class Main {

	static final String task = "a";
	
	public static void main(String[] args) throws Exception {
		//Scanner in = new Scanner(new FileReader(task+".in"));
		//BufferedReader in = new BufferedReader(new FileReader(task+".in"));
		
		StreamTokenizer in = new StreamTokenizer(new FileReader(task+".in"));
		
		PrintWriter out = new PrintWriter(new File(task+".out"));
		
		in.nextToken();
		int n = (int)in.nval;
		in.nextToken();
		int k = (int)in.nval;
		
		int[] a = new int [n];
		for (int i = 0; i < n; i++) {
			in.nextToken();
			a[i] = (int)in.nval;
		}
		
		Arrays.sort(a);
		
		long res = 0;
		
		for (int i = k; i < a.length; i++) {
			res += a[i];
		}
		out.print(res);
		
		//in.close();
		out.close();
	}

}
