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

public class Main {
	public static void main(String[] args) throws IOException {
     Scanner sc = new Scanner(System.in);
     int monsters = sc.nextInt(); 
     int specialMove = sc.nextInt(); 
     int health[] = new int[monsters]; 
     
     for(int i = 0;i<monsters; i++) {
    	 health[i] = sc.nextInt(); 
     }
     
     Arrays.sort(health);
     if(specialMove > monsters) {
    	 Arrays.fill(health, 0);
     }
     else {
          for(int i = 1; i<=specialMove; i++) {
    	    health[monsters-i] = 0; 
           }
     }
    long ans = 0; 
    for(int i = 0; i<monsters; i++) {
    	ans += health[i]; 
    }
    System.out.println(ans); 
	}
} import java.util.*; util.* java import java.io.*; io.* java public class Main {
	public static void main(String[] args) throws IOException {
     Scanner sc = new Scanner(System.in);
     int monsters = sc.nextInt(); 
     int specialMove = sc.nextInt(); 
     int health[] = new int[monsters]; 
     
     for(int i = 0;i<monsters; i++) {
    	 health[i] = sc.nextInt(); 
     }
     
     Arrays.sort(health);
     if(specialMove > monsters) {
    	 Arrays.fill(health, 0);
     }
     else {
          for(int i = 1; i<=specialMove; i++) {
    	    health[monsters-i] = 0; 
           }
     }
    long ans = 0; 
    for(int i = 0; i<monsters; i++) {
    	ans += health[i]; 
    }
    System.out.println(ans); 
	}
} Main public static void main(String[] args) throws IOException {
     Scanner sc = new Scanner(System.in);
     int monsters = sc.nextInt(); 
     int specialMove = sc.nextInt(); 
     int health[] = new int[monsters]; 
     
     for(int i = 0;i<monsters; i++) {
    	 health[i] = sc.nextInt(); 
     }
     
     Arrays.sort(health);
     if(specialMove > monsters) {
    	 Arrays.fill(health, 0);
     }
     else {
          for(int i = 1; i<=specialMove; i++) {
    	    health[monsters-i] = 0; 
           }
     }
    long ans = 0; 
    for(int i = 0; i<monsters; i++) {
    	ans += health[i]; 
    }
    System.out.println(ans); 
	} main {
     Scanner sc = new Scanner(System.in);
     int monsters = sc.nextInt(); 
     int specialMove = sc.nextInt(); 
     int health[] = new int[monsters]; 
     
     for(int i = 0;i<monsters; i++) {
    	 health[i] = sc.nextInt(); 
     }
     
     Arrays.sort(health);
     if(specialMove > monsters) {
    	 Arrays.fill(health, 0);
     }
     else {
          for(int i = 1; i<=specialMove; i++) {
    	    health[monsters-i] = 0; 
           }
     }
    long ans = 0; 
    for(int i = 0; i<monsters; i++) {
    	ans += health[i]; 
    }
    System.out.println(ans); 
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int monsters = sc.nextInt(); monsters sc.nextInt() sc.nextInt sc int specialMove = sc.nextInt(); specialMove sc.nextInt() sc.nextInt sc int health[] = new int[monsters]; health new int[monsters] monsters for(int i = 0;i<monsters; i++) {
    	 health[i] = sc.nextInt(); 
     } int i = 0; int i = 0; i 0 i<monsters i monsters i++ i++ i {
    	 health[i] = sc.nextInt(); 
     } {
    	 health[i] = sc.nextInt(); 
     } health[i] = sc.nextInt() health[i] health i sc.nextInt() sc.nextInt sc Arrays.sort(health) Arrays.sort Arrays health if(specialMove > monsters) {
    	 Arrays.fill(health, 0);
     }
     else {
          for(int i = 1; i<=specialMove; i++) {
    	    health[monsters-i] = 0; 
           }
     } specialMove > monsters specialMove monsters {
    	 Arrays.fill(health, 0);
     } Arrays.fill(health, 0) Arrays.fill Arrays health 0 {
          for(int i = 1; i<=specialMove; i++) {
    	    health[monsters-i] = 0; 
           }
     } for(int i = 1; i<=specialMove; i++) {
    	    health[monsters-i] = 0; 
           } int i = 1; int i = 1; i 1 i<=specialMove i specialMove i++ i++ i {
    	    health[monsters-i] = 0; 
           } {
    	    health[monsters-i] = 0; 
           } health[monsters-i] = 0 health[monsters-i] health monsters-i monsters i 0 long ans = 0; ans 0 for(int i = 0; i<monsters; i++) {
    	ans += health[i]; 
    } int i = 0; int i = 0; i 0 i<monsters i monsters i++ i++ i {
    	ans += health[i]; 
    } {
    	ans += health[i]; 
    } ans += health[i] ans health[i] health i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) throws IOException {
     Scanner sc = new Scanner(System.in);
     int monsters = sc.nextInt(); 
     int specialMove = sc.nextInt(); 
     int health[] = new int[monsters]; 
     
     for(int i = 0;i<monsters; i++) {
    	 health[i] = sc.nextInt(); 
     }
     
     Arrays.sort(health);
     if(specialMove > monsters) {
    	 Arrays.fill(health, 0);
     }
     else {
          for(int i = 1; i<=specialMove; i++) {
    	    health[monsters-i] = 0; 
           }
     }
    long ans = 0; 
    for(int i = 0; i<monsters; i++) {
    	ans += health[i]; 
    }
    System.out.println(ans); 
	}
} public class Main {
	public static void main(String[] args) throws IOException {
     Scanner sc = new Scanner(System.in);
     int monsters = sc.nextInt(); 
     int specialMove = sc.nextInt(); 
     int health[] = new int[monsters]; 
     
     for(int i = 0;i<monsters; i++) {
    	 health[i] = sc.nextInt(); 
     }
     
     Arrays.sort(health);
     if(specialMove > monsters) {
    	 Arrays.fill(health, 0);
     }
     else {
          for(int i = 1; i<=specialMove; i++) {
    	    health[monsters-i] = 0; 
           }
     }
    long ans = 0; 
    for(int i = 0; i<monsters; i++) {
    	ans += health[i]; 
    }
    System.out.println(ans); 
	}
} Main
import java.util.*; 
import java.io.*; 

public class Main {
	public static void main(String[] args) throws IOException {
     Scanner sc = new Scanner(System.in);
     int monsters = sc.nextInt(); 
     int specialMove = sc.nextInt(); 
     int health[] = new int[monsters]; 
     
     for(int i = 0;i<monsters; i++) {
    	 health[i] = sc.nextInt(); 
     }
     
     Arrays.sort(health);
     if(specialMove > monsters) {
    	 Arrays.fill(health, 0);
     }
     else {
          for(int i = 1; i<=specialMove; i++) {
    	    health[monsters-i] = 0; 
           }
     }
    long ans = 0; 
    for(int i = 0; i<monsters; i++) {
    	ans += health[i]; 
    }
    System.out.println(ans); 
	}
}
