import java.util.Arrays;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
      
		Scanner sc = new Scanner (System.in);
		int monster = sc.nextInt();
		int times = sc.nextInt();
		long physical[] = new long[monster];
		long sumPhysical = 0;

		for(int i=0 ; i<monster ; i++) {
			physical[i] = sc.nextInt();
		}

		Arrays.sort(physical);

		for(int i=0 ; i<monster-times ; i++) {
			sumPhysical += physical[i];
		}

		System.out.println(sumPhysical);
		sc.close();
	}
} import java.util.Arrays; Arrays 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 monster = sc.nextInt();
		int times = sc.nextInt();
		long physical[] = new long[monster];
		long sumPhysical = 0;

		for(int i=0 ; i<monster ; i++) {
			physical[i] = sc.nextInt();
		}

		Arrays.sort(physical);

		for(int i=0 ; i<monster-times ; i++) {
			sumPhysical += physical[i];
		}

		System.out.println(sumPhysical);
		sc.close();
	}
} Main public static void main(String[] args) {
      
		Scanner sc = new Scanner (System.in);
		int monster = sc.nextInt();
		int times = sc.nextInt();
		long physical[] = new long[monster];
		long sumPhysical = 0;

		for(int i=0 ; i<monster ; i++) {
			physical[i] = sc.nextInt();
		}

		Arrays.sort(physical);

		for(int i=0 ; i<monster-times ; i++) {
			sumPhysical += physical[i];
		}

		System.out.println(sumPhysical);
		sc.close();
	} main {
      
		Scanner sc = new Scanner (System.in);
		int monster = sc.nextInt();
		int times = sc.nextInt();
		long physical[] = new long[monster];
		long sumPhysical = 0;

		for(int i=0 ; i<monster ; i++) {
			physical[i] = sc.nextInt();
		}

		Arrays.sort(physical);

		for(int i=0 ; i<monster-times ; i++) {
			sumPhysical += physical[i];
		}

		System.out.println(sumPhysical);
		sc.close();
	} Scanner sc = new Scanner (System.in); sc new Scanner (System.in) int monster = sc.nextInt(); monster sc.nextInt() sc.nextInt sc int times = sc.nextInt(); times sc.nextInt() sc.nextInt sc long physical[] = new long[monster]; physical new long[monster] monster long sumPhysical = 0; sumPhysical 0 for(int i=0 ; i<monster ; i++) {
			physical[i] = sc.nextInt();
		} int i=0 ; int i=0 ; i 0 i<monster i monster i++ i++ i {
			physical[i] = sc.nextInt();
		} {
			physical[i] = sc.nextInt();
		} physical[i] = sc.nextInt() physical[i] physical i sc.nextInt() sc.nextInt sc Arrays.sort(physical) Arrays.sort Arrays physical for(int i=0 ; i<monster-times ; i++) {
			sumPhysical += physical[i];
		} int i=0 ; int i=0 ; i 0 i<monster-times i monster-times monster times i++ i++ i {
			sumPhysical += physical[i];
		} {
			sumPhysical += physical[i];
		} sumPhysical += physical[i] sumPhysical physical[i] physical i System.out.println(sumPhysical) System.out.println System.out System System.out sumPhysical sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) {
      
		Scanner sc = new Scanner (System.in);
		int monster = sc.nextInt();
		int times = sc.nextInt();
		long physical[] = new long[monster];
		long sumPhysical = 0;

		for(int i=0 ; i<monster ; i++) {
			physical[i] = sc.nextInt();
		}

		Arrays.sort(physical);

		for(int i=0 ; i<monster-times ; i++) {
			sumPhysical += physical[i];
		}

		System.out.println(sumPhysical);
		sc.close();
	}
} public class Main {
	public static void main(String[] args) {
      
		Scanner sc = new Scanner (System.in);
		int monster = sc.nextInt();
		int times = sc.nextInt();
		long physical[] = new long[monster];
		long sumPhysical = 0;

		for(int i=0 ; i<monster ; i++) {
			physical[i] = sc.nextInt();
		}

		Arrays.sort(physical);

		for(int i=0 ; i<monster-times ; i++) {
			sumPhysical += physical[i];
		}

		System.out.println(sumPhysical);
		sc.close();
	}
} Main
import java.util.Arrays;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
      
		Scanner sc = new Scanner (System.in);
		int monster = sc.nextInt();
		int times = sc.nextInt();
		long physical[] = new long[monster];
		long sumPhysical = 0;

		for(int i=0 ; i<monster ; i++) {
			physical[i] = sc.nextInt();
		}

		Arrays.sort(physical);

		for(int i=0 ; i<monster-times ; i++) {
			sumPhysical += physical[i];
		}

		System.out.println(sumPhysical);
		sc.close();
	}
}