

import java.util.ArrayList;
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 count = 0l;

		ArrayList<Integer> deque = new ArrayList<>();

		for (int i = 0; i < n; i++) {
			deque.add(scan.nextInt());
		}

		Collections.sort(deque);

		if (n > k) {
			for (int i = 0; i < k; i++) {
				deque.remove(deque.size() - 1);
			}

			for (int i = 0; i < deque.size(); i++) {
				count += deque.get(i);
			}
		}

		System.out.println(count);
	}

} 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 scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();

		long count = 0l;

		ArrayList<Integer> deque = new ArrayList<>();

		for (int i = 0; i < n; i++) {
			deque.add(scan.nextInt());
		}

		Collections.sort(deque);

		if (n > k) {
			for (int i = 0; i < k; i++) {
				deque.remove(deque.size() - 1);
			}

			for (int i = 0; i < deque.size(); i++) {
				count += deque.get(i);
			}
		}

		System.out.println(count);
	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();

		long count = 0l;

		ArrayList<Integer> deque = new ArrayList<>();

		for (int i = 0; i < n; i++) {
			deque.add(scan.nextInt());
		}

		Collections.sort(deque);

		if (n > k) {
			for (int i = 0; i < k; i++) {
				deque.remove(deque.size() - 1);
			}

			for (int i = 0; i < deque.size(); i++) {
				count += deque.get(i);
			}
		}

		System.out.println(count);
	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();

		long count = 0l;

		ArrayList<Integer> deque = new ArrayList<>();

		for (int i = 0; i < n; i++) {
			deque.add(scan.nextInt());
		}

		Collections.sort(deque);

		if (n > k) {
			for (int i = 0; i < k; i++) {
				deque.remove(deque.size() - 1);
			}

			for (int i = 0; i < deque.size(); i++) {
				count += deque.get(i);
			}
		}

		System.out.println(count);
	} 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 count = 0l; count 0l ArrayList<Integer> deque = new ArrayList<>(); deque new ArrayList<>() for (int i = 0; i < n; i++) {
			deque.add(scan.nextInt());
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			deque.add(scan.nextInt());
		} {
			deque.add(scan.nextInt());
		} deque.add(scan.nextInt()) deque.add deque scan.nextInt() scan.nextInt scan Collections.sort(deque) Collections.sort Collections deque if (n > k) {
			for (int i = 0; i < k; i++) {
				deque.remove(deque.size() - 1);
			}

			for (int i = 0; i < deque.size(); i++) {
				count += deque.get(i);
			}
		} n > k n k {
			for (int i = 0; i < k; i++) {
				deque.remove(deque.size() - 1);
			}

			for (int i = 0; i < deque.size(); i++) {
				count += deque.get(i);
			}
		} for (int i = 0; i < k; i++) {
				deque.remove(deque.size() - 1);
			} int i = 0; int i = 0; i 0 i < k i k i++ i++ i {
				deque.remove(deque.size() - 1);
			} {
				deque.remove(deque.size() - 1);
			} deque.remove(deque.size() - 1) deque.remove deque deque.size() - 1 deque.size() deque.size deque 1 for (int i = 0; i < deque.size(); i++) {
				count += deque.get(i);
			} int i = 0; int i = 0; i 0 i < deque.size() i deque.size() deque.size deque i++ i++ i {
				count += deque.get(i);
			} {
				count += deque.get(i);
			} count += deque.get(i) count deque.get(i) deque.get deque i System.out.println(count) System.out.println System.out System System.out count 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 count = 0l;

		ArrayList<Integer> deque = new ArrayList<>();

		for (int i = 0; i < n; i++) {
			deque.add(scan.nextInt());
		}

		Collections.sort(deque);

		if (n > k) {
			for (int i = 0; i < k; i++) {
				deque.remove(deque.size() - 1);
			}

			for (int i = 0; i < deque.size(); i++) {
				count += deque.get(i);
			}
		}

		System.out.println(count);
	}

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

		long count = 0l;

		ArrayList<Integer> deque = new ArrayList<>();

		for (int i = 0; i < n; i++) {
			deque.add(scan.nextInt());
		}

		Collections.sort(deque);

		if (n > k) {
			for (int i = 0; i < k; i++) {
				deque.remove(deque.size() - 1);
			}

			for (int i = 0; i < deque.size(); i++) {
				count += deque.get(i);
			}
		}

		System.out.println(count);
	}

} Main


import java.util.ArrayList;
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 count = 0l;

		ArrayList<Integer> deque = new ArrayList<>();

		for (int i = 0; i < n; i++) {
			deque.add(scan.nextInt());
		}

		Collections.sort(deque);

		if (n > k) {
			for (int i = 0; i < k; i++) {
				deque.remove(deque.size() - 1);
			}

			for (int i = 0; i < deque.size(); i++) {
				count += deque.get(i);
			}
		}

		System.out.println(count);
	}

}
