/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		Integer[] a = new Integer[n];
		for(int i=0;i<n;++i) a[i] = sc.nextInt();
		Arrays.sort(a);
		long sum = 0;
		for(int i=0;i<n;++i){
			if(n-i > k)
			sum+=a[i];
		}
	
		 System.out.print(sum);
		
	}
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		Integer[] a = new Integer[n];
		for(int i=0;i<n;++i) a[i] = sc.nextInt();
		Arrays.sort(a);
		long sum = 0;
		for(int i=0;i<n;++i){
			if(n-i > k)
			sum+=a[i];
		}
	
		 System.out.print(sum);
		
	}
} Main public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		Integer[] a = new Integer[n];
		for(int i=0;i<n;++i) a[i] = sc.nextInt();
		Arrays.sort(a);
		long sum = 0;
		for(int i=0;i<n;++i){
			if(n-i > k)
			sum+=a[i];
		}
	
		 System.out.print(sum);
		
	} main {
		// your code goes here
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		Integer[] a = new Integer[n];
		for(int i=0;i<n;++i) a[i] = sc.nextInt();
		Arrays.sort(a);
		long sum = 0;
		for(int i=0;i<n;++i){
			if(n-i > k)
			sum+=a[i];
		}
	
		 System.out.print(sum);
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc int k = sc.nextInt(); k sc.nextInt() sc.nextInt sc Integer[] a = new Integer[n]; a new Integer[n] n for(int i=0;i<n;++i) a[i] = sc.nextInt(); int i=0; int i=0; i 0 i<n i n ++i ++i i a[i] = sc.nextInt(); a[i] = sc.nextInt() a[i] a i sc.nextInt() sc.nextInt sc Arrays.sort(a) Arrays.sort Arrays a long sum = 0; sum 0 for(int i=0;i<n;++i){
			if(n-i > k)
			sum+=a[i];
		} int i=0; int i=0; i 0 i<n i n ++i ++i i {
			if(n-i > k)
			sum+=a[i];
		} {
			if(n-i > k)
			sum+=a[i];
		} if(n-i > k)
			sum+=a[i]; n-i > k n-i n i k sum+=a[i] sum a[i] a i System.out.print(sum) System.out.print System.out System System.out sum String[] args args public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		Integer[] a = new Integer[n];
		for(int i=0;i<n;++i) a[i] = sc.nextInt();
		Arrays.sort(a);
		long sum = 0;
		for(int i=0;i<n;++i){
			if(n-i > k)
			sum+=a[i];
		}
	
		 System.out.print(sum);
		
	}
} public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		Integer[] a = new Integer[n];
		for(int i=0;i<n;++i) a[i] = sc.nextInt();
		Arrays.sort(a);
		long sum = 0;
		for(int i=0;i<n;++i){
			if(n-i > k)
			sum+=a[i];
		}
	
		 System.out.print(sum);
		
	}
} Main
/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		Integer[] a = new Integer[n];
		for(int i=0;i<n;++i) a[i] = sc.nextInt();
		Arrays.sort(a);
		long sum = 0;
		for(int i=0;i<n;++i){
			if(n-i > k)
			sum+=a[i];
		}
	
		 System.out.print(sum);
		
	}
}