import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
 
public class Main {
	public static void main (String args[]) {
		Scanner scan = new Scanner(System.in);
		int N = Integer.parseInt(scan.next());
		int K = Integer.parseInt(scan.next());
		List<Long> numList = new ArrayList<Long>();
		long sum = 0;
		for(int i = 0; i < N; i++) {
			numList.add(Long.parseLong(scan.next()));
		}
		Collections.sort(numList, Collections.reverseOrder());
		if(N <= K) {
			System.out.println(sum);
			return;
		}
		for(int i = K; i < N; i++) {
			sum += numList.get(i);
		}
		System.out.println(sum);
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.List; List 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 = Integer.parseInt(scan.next());
		int K = Integer.parseInt(scan.next());
		List<Long> numList = new ArrayList<Long>();
		long sum = 0;
		for(int i = 0; i < N; i++) {
			numList.add(Long.parseLong(scan.next()));
		}
		Collections.sort(numList, Collections.reverseOrder());
		if(N <= K) {
			System.out.println(sum);
			return;
		}
		for(int i = K; i < N; i++) {
			sum += numList.get(i);
		}
		System.out.println(sum);
	}
} Main public static void main (String args[]) {
		Scanner scan = new Scanner(System.in);
		int N = Integer.parseInt(scan.next());
		int K = Integer.parseInt(scan.next());
		List<Long> numList = new ArrayList<Long>();
		long sum = 0;
		for(int i = 0; i < N; i++) {
			numList.add(Long.parseLong(scan.next()));
		}
		Collections.sort(numList, Collections.reverseOrder());
		if(N <= K) {
			System.out.println(sum);
			return;
		}
		for(int i = K; i < N; i++) {
			sum += numList.get(i);
		}
		System.out.println(sum);
	} main {
		Scanner scan = new Scanner(System.in);
		int N = Integer.parseInt(scan.next());
		int K = Integer.parseInt(scan.next());
		List<Long> numList = new ArrayList<Long>();
		long sum = 0;
		for(int i = 0; i < N; i++) {
			numList.add(Long.parseLong(scan.next()));
		}
		Collections.sort(numList, Collections.reverseOrder());
		if(N <= K) {
			System.out.println(sum);
			return;
		}
		for(int i = K; i < N; i++) {
			sum += numList.get(i);
		}
		System.out.println(sum);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int N = Integer.parseInt(scan.next()); N Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan int K = Integer.parseInt(scan.next()); K Integer.parseInt(scan.next()) Integer.parseInt Integer scan.next() scan.next scan List<Long> numList = new ArrayList<Long>(); numList new ArrayList<Long>() long sum = 0; sum 0 for(int i = 0; i < N; i++) {
			numList.add(Long.parseLong(scan.next()));
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			numList.add(Long.parseLong(scan.next()));
		} {
			numList.add(Long.parseLong(scan.next()));
		} numList.add(Long.parseLong(scan.next())) numList.add numList Long.parseLong(scan.next()) Long.parseLong Long scan.next() scan.next scan Collections.sort(numList, Collections.reverseOrder()) Collections.sort Collections numList Collections.reverseOrder() Collections.reverseOrder Collections if(N <= K) {
			System.out.println(sum);
			return;
		} N <= K N K {
			System.out.println(sum);
			return;
		} System.out.println(sum) System.out.println System.out System System.out sum return; for(int i = K; i < N; i++) {
			sum += numList.get(i);
		} int i = K; int i = K; i K i < N i N i++ i++ i {
			sum += numList.get(i);
		} {
			sum += numList.get(i);
		} sum += numList.get(i) sum numList.get(i) numList.get numList i System.out.println(sum) System.out.println System.out System System.out sum String args[] args public class Main {
	public static void main (String args[]) {
		Scanner scan = new Scanner(System.in);
		int N = Integer.parseInt(scan.next());
		int K = Integer.parseInt(scan.next());
		List<Long> numList = new ArrayList<Long>();
		long sum = 0;
		for(int i = 0; i < N; i++) {
			numList.add(Long.parseLong(scan.next()));
		}
		Collections.sort(numList, Collections.reverseOrder());
		if(N <= K) {
			System.out.println(sum);
			return;
		}
		for(int i = K; i < N; i++) {
			sum += numList.get(i);
		}
		System.out.println(sum);
	}
} public class Main {
	public static void main (String args[]) {
		Scanner scan = new Scanner(System.in);
		int N = Integer.parseInt(scan.next());
		int K = Integer.parseInt(scan.next());
		List<Long> numList = new ArrayList<Long>();
		long sum = 0;
		for(int i = 0; i < N; i++) {
			numList.add(Long.parseLong(scan.next()));
		}
		Collections.sort(numList, Collections.reverseOrder());
		if(N <= K) {
			System.out.println(sum);
			return;
		}
		for(int i = K; i < N; i++) {
			sum += numList.get(i);
		}
		System.out.println(sum);
	}
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Scanner;
 
public class Main {
	public static void main (String args[]) {
		Scanner scan = new Scanner(System.in);
		int N = Integer.parseInt(scan.next());
		int K = Integer.parseInt(scan.next());
		List<Long> numList = new ArrayList<Long>();
		long sum = 0;
		for(int i = 0; i < N; i++) {
			numList.add(Long.parseLong(scan.next()));
		}
		Collections.sort(numList, Collections.reverseOrder());
		if(N <= K) {
			System.out.println(sum);
			return;
		}
		for(int i = K; i < N; i++) {
			sum += numList.get(i);
		}
		System.out.println(sum);
	}
}