import java.util.*;
import static java.lang.Math.ceil;
class Main{
	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		long n = input.nextLong();
		long k = input.nextInt();
		Vector h = new Vector();
		for(int i = 0;i < n; ++i){
			long x  = input.nextInt();
			h.add(x);
		}
		long ans = 0;
		Collections.sort(h);
		Collections.reverse(h);
		for(int i = 0;i < n; ++i){
			if(k > 0){
				k--;
			}else{
				ans += (long)h.elementAt(i);
			}
		}
		System.out.println(ans);
	}
} import java.util.*; util.* java import static java.lang.Math.ceil; import static java.lang.Math.ceil; import static java.lang.Math.ceil; class Main{
	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		long n = input.nextLong();
		long k = input.nextInt();
		Vector h = new Vector();
		for(int i = 0;i < n; ++i){
			long x  = input.nextInt();
			h.add(x);
		}
		long ans = 0;
		Collections.sort(h);
		Collections.reverse(h);
		for(int i = 0;i < n; ++i){
			if(k > 0){
				k--;
			}else{
				ans += (long)h.elementAt(i);
			}
		}
		System.out.println(ans);
	}
} Main public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		long n = input.nextLong();
		long k = input.nextInt();
		Vector h = new Vector();
		for(int i = 0;i < n; ++i){
			long x  = input.nextInt();
			h.add(x);
		}
		long ans = 0;
		Collections.sort(h);
		Collections.reverse(h);
		for(int i = 0;i < n; ++i){
			if(k > 0){
				k--;
			}else{
				ans += (long)h.elementAt(i);
			}
		}
		System.out.println(ans);
	} main {
		Scanner input = new Scanner(System.in);
		long n = input.nextLong();
		long k = input.nextInt();
		Vector h = new Vector();
		for(int i = 0;i < n; ++i){
			long x  = input.nextInt();
			h.add(x);
		}
		long ans = 0;
		Collections.sort(h);
		Collections.reverse(h);
		for(int i = 0;i < n; ++i){
			if(k > 0){
				k--;
			}else{
				ans += (long)h.elementAt(i);
			}
		}
		System.out.println(ans);
	} Scanner input = new Scanner(System.in); input new Scanner(System.in) long n = input.nextLong(); n input.nextLong() input.nextLong input long k = input.nextInt(); k input.nextInt() input.nextInt input Vector h = new Vector(); h new Vector() for(int i = 0;i < n; ++i){
			long x  = input.nextInt();
			h.add(x);
		} int i = 0; int i = 0; i 0 i < n i n ++i ++i i {
			long x  = input.nextInt();
			h.add(x);
		} {
			long x  = input.nextInt();
			h.add(x);
		} long x  = input.nextInt(); x input.nextInt() input.nextInt input h.add(x) h.add h x long ans = 0; ans 0 Collections.sort(h) Collections.sort Collections h Collections.reverse(h) Collections.reverse Collections h for(int i = 0;i < n; ++i){
			if(k > 0){
				k--;
			}else{
				ans += (long)h.elementAt(i);
			}
		} int i = 0; int i = 0; i 0 i < n i n ++i ++i i {
			if(k > 0){
				k--;
			}else{
				ans += (long)h.elementAt(i);
			}
		} {
			if(k > 0){
				k--;
			}else{
				ans += (long)h.elementAt(i);
			}
		} if(k > 0){
				k--;
			}else{
				ans += (long)h.elementAt(i);
			} k > 0 k 0 {
				k--;
			} k-- k {
				ans += (long)h.elementAt(i);
			} ans += (long)h.elementAt(i) ans (long)h.elementAt(i) h.elementAt h i System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;
import static java.lang.Math.ceil;
class Main{
	public static void main(String[] args){
		Scanner input = new Scanner(System.in);
		long n = input.nextLong();
		long k = input.nextInt();
		Vector h = new Vector();
		for(int i = 0;i < n; ++i){
			long x  = input.nextInt();
			h.add(x);
		}
		long ans = 0;
		Collections.sort(h);
		Collections.reverse(h);
		for(int i = 0;i < n; ++i){
			if(k > 0){
				k--;
			}else{
				ans += (long)h.elementAt(i);
			}
		}
		System.out.println(ans);
	}
}