import java .util.ArrayList;
import java.util.Collections;
import java .util.Scanner;
public class Main {
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);

	int inputN = sc.nextInt();
	int inputK = sc.nextInt();

	ArrayList<Long>  inH = new ArrayList<>();

	long attack = 0;

	for(int i = 0; i < inputN; i++) {
		inH.add(sc.nextLong());
	}

	Collections.sort(inH, Collections.reverseOrder());

	for(int i = inputK; i < inH.size(); i++) {
		attack += inH.get(i);
	}

	System.out.println(attack);

}
} import java .util.ArrayList; ArrayList java .util import java.util.Collections; Collections java.util import java .util.Scanner; Scanner java .util public class Main {
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);

	int inputN = sc.nextInt();
	int inputK = sc.nextInt();

	ArrayList<Long>  inH = new ArrayList<>();

	long attack = 0;

	for(int i = 0; i < inputN; i++) {
		inH.add(sc.nextLong());
	}

	Collections.sort(inH, Collections.reverseOrder());

	for(int i = inputK; i < inH.size(); i++) {
		attack += inH.get(i);
	}

	System.out.println(attack);

}
} Main public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);

	int inputN = sc.nextInt();
	int inputK = sc.nextInt();

	ArrayList<Long>  inH = new ArrayList<>();

	long attack = 0;

	for(int i = 0; i < inputN; i++) {
		inH.add(sc.nextLong());
	}

	Collections.sort(inH, Collections.reverseOrder());

	for(int i = inputK; i < inH.size(); i++) {
		attack += inH.get(i);
	}

	System.out.println(attack);

} main {
	Scanner sc = new Scanner(System.in);

	int inputN = sc.nextInt();
	int inputK = sc.nextInt();

	ArrayList<Long>  inH = new ArrayList<>();

	long attack = 0;

	for(int i = 0; i < inputN; i++) {
		inH.add(sc.nextLong());
	}

	Collections.sort(inH, Collections.reverseOrder());

	for(int i = inputK; i < inH.size(); i++) {
		attack += inH.get(i);
	}

	System.out.println(attack);

} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int inputN = sc.nextInt(); inputN sc.nextInt() sc.nextInt sc int inputK = sc.nextInt(); inputK sc.nextInt() sc.nextInt sc ArrayList<Long>  inH = new ArrayList<>(); inH new ArrayList<>() long attack = 0; attack 0 for(int i = 0; i < inputN; i++) {
		inH.add(sc.nextLong());
	} int i = 0; int i = 0; i 0 i < inputN i inputN i++ i++ i {
		inH.add(sc.nextLong());
	} {
		inH.add(sc.nextLong());
	} inH.add(sc.nextLong()) inH.add inH sc.nextLong() sc.nextLong sc Collections.sort(inH, Collections.reverseOrder()) Collections.sort Collections inH Collections.reverseOrder() Collections.reverseOrder Collections for(int i = inputK; i < inH.size(); i++) {
		attack += inH.get(i);
	} int i = inputK; int i = inputK; i inputK i < inH.size() i inH.size() inH.size inH i++ i++ i {
		attack += inH.get(i);
	} {
		attack += inH.get(i);
	} attack += inH.get(i) attack inH.get(i) inH.get inH i System.out.println(attack) System.out.println System.out System System.out attack String[] args args public class Main {
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);

	int inputN = sc.nextInt();
	int inputK = sc.nextInt();

	ArrayList<Long>  inH = new ArrayList<>();

	long attack = 0;

	for(int i = 0; i < inputN; i++) {
		inH.add(sc.nextLong());
	}

	Collections.sort(inH, Collections.reverseOrder());

	for(int i = inputK; i < inH.size(); i++) {
		attack += inH.get(i);
	}

	System.out.println(attack);

}
} public class Main {
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);

	int inputN = sc.nextInt();
	int inputK = sc.nextInt();

	ArrayList<Long>  inH = new ArrayList<>();

	long attack = 0;

	for(int i = 0; i < inputN; i++) {
		inH.add(sc.nextLong());
	}

	Collections.sort(inH, Collections.reverseOrder());

	for(int i = inputK; i < inH.size(); i++) {
		attack += inH.get(i);
	}

	System.out.println(attack);

}
} Main
import java .util.ArrayList;
import java.util.Collections;
import java .util.Scanner;
public class Main {
public static void main(String[] args) {
	Scanner sc = new Scanner(System.in);

	int inputN = sc.nextInt();
	int inputK = sc.nextInt();

	ArrayList<Long>  inH = new ArrayList<>();

	long attack = 0;

	for(int i = 0; i < inputN; i++) {
		inH.add(sc.nextLong());
	}

	Collections.sort(inH, Collections.reverseOrder());

	for(int i = inputK; i < inH.size(); i++) {
		attack += inH.get(i);
	}

	System.out.println(attack);

}
}
