import java.io.*;
import java.util.*;


public class Main
{	
	public static void main(String args[])
	{
		try
			{
				Scanner in =new Scanner(new FileReader("A.in"));
				int n = in.nextInt();
				int k = in.nextInt();
				int [] f = new int[n];
				for (int i = 0; i < n; i++) f[i] = in.nextInt();
				Arrays.sort(f);
				long sum = 0;
				for (int i = k; i < n; i++) sum += f[i];
				in.close();
				PrintWriter out = new PrintWriter(new FileWriter("A.out"));
				out.println(sum);
				out.close();
				
			}
			catch(IOException e){}
	
	}
}