import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		Long[] lifes = new Long[N];
		for (int i=0; i < N; i++) {
			lifes[i] = scan.nextLong();
		}
		Arrays.sort(lifes, Collections.reverseOrder());

		for (int i=0; i < K; i++) {
			if (i >= N) break;
			lifes[i] = Long.valueOf(0);
		}
		long ans = 0;
		for (long i : lifes) {
			ans += i;
		}
		System.out.println(ans);
	}
} import java.util.Arrays; Arrays 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 scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		Long[] lifes = new Long[N];
		for (int i=0; i < N; i++) {
			lifes[i] = scan.nextLong();
		}
		Arrays.sort(lifes, Collections.reverseOrder());

		for (int i=0; i < K; i++) {
			if (i >= N) break;
			lifes[i] = Long.valueOf(0);
		}
		long ans = 0;
		for (long i : lifes) {
			ans += i;
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		Long[] lifes = new Long[N];
		for (int i=0; i < N; i++) {
			lifes[i] = scan.nextLong();
		}
		Arrays.sort(lifes, Collections.reverseOrder());

		for (int i=0; i < K; i++) {
			if (i >= N) break;
			lifes[i] = Long.valueOf(0);
		}
		long ans = 0;
		for (long i : lifes) {
			ans += i;
		}
		System.out.println(ans);
	} main {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		Long[] lifes = new Long[N];
		for (int i=0; i < N; i++) {
			lifes[i] = scan.nextLong();
		}
		Arrays.sort(lifes, Collections.reverseOrder());

		for (int i=0; i < K; i++) {
			if (i >= N) break;
			lifes[i] = Long.valueOf(0);
		}
		long ans = 0;
		for (long i : lifes) {
			ans += i;
		}
		System.out.println(ans);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int K = scan.nextInt(); K scan.nextInt() scan.nextInt scan Long[] lifes = new Long[N]; lifes new Long[N] N for (int i=0; i < N; i++) {
			lifes[i] = scan.nextLong();
		} int i=0; int i=0; i 0 i < N i N i++ i++ i {
			lifes[i] = scan.nextLong();
		} {
			lifes[i] = scan.nextLong();
		} lifes[i] = scan.nextLong() lifes[i] lifes i scan.nextLong() scan.nextLong scan Arrays.sort(lifes, Collections.reverseOrder()) Arrays.sort Arrays lifes Collections.reverseOrder() Collections.reverseOrder Collections for (int i=0; i < K; i++) {
			if (i >= N) break;
			lifes[i] = Long.valueOf(0);
		} int i=0; int i=0; i 0 i < K i K i++ i++ i {
			if (i >= N) break;
			lifes[i] = Long.valueOf(0);
		} {
			if (i >= N) break;
			lifes[i] = Long.valueOf(0);
		} if (i >= N) break; i >= N i N break; lifes[i] = Long.valueOf(0) lifes[i] lifes i Long.valueOf(0) Long.valueOf Long 0 long ans = 0; ans 0 for (long i : lifes) {
			ans += i;
		} long i lifes {
			ans += i;
		} {
			ans += i;
		} ans += i ans i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		Long[] lifes = new Long[N];
		for (int i=0; i < N; i++) {
			lifes[i] = scan.nextLong();
		}
		Arrays.sort(lifes, Collections.reverseOrder());

		for (int i=0; i < K; i++) {
			if (i >= N) break;
			lifes[i] = Long.valueOf(0);
		}
		long ans = 0;
		for (long i : lifes) {
			ans += i;
		}
		System.out.println(ans);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		Long[] lifes = new Long[N];
		for (int i=0; i < N; i++) {
			lifes[i] = scan.nextLong();
		}
		Arrays.sort(lifes, Collections.reverseOrder());

		for (int i=0; i < K; i++) {
			if (i >= N) break;
			lifes[i] = Long.valueOf(0);
		}
		long ans = 0;
		for (long i : lifes) {
			ans += i;
		}
		System.out.println(ans);
	}
} Main
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int N = scan.nextInt();
		int K = scan.nextInt();

		Long[] lifes = new Long[N];
		for (int i=0; i < N; i++) {
			lifes[i] = scan.nextLong();
		}
		Arrays.sort(lifes, Collections.reverseOrder());

		for (int i=0; i < K; i++) {
			if (i >= N) break;
			lifes[i] = Long.valueOf(0);
		}
		long ans = 0;
		for (long i : lifes) {
			ans += i;
		}
		System.out.println(ans);
	}
}