import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int enemy = sc.nextInt();
    int pp = sc.nextInt();sc.nextLine();
    String[] string = sc.nextLine().split(" ");
    long[] input = new long[enemy];
    
    for(int i = 0; i < enemy; i++){
      input[i] = Long.parseLong(string[i]);
    }
    Arrays.sort(input);
    while(pp > 0){
      enemy--;
      pp--;
    }
    long sum = 0;
    for(int i = 0; i < enemy; i++){
      sum += input[i];
    }
    
    
    System.out.println(sum);
  }
} import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int enemy = sc.nextInt();
    int pp = sc.nextInt();sc.nextLine();
    String[] string = sc.nextLine().split(" ");
    long[] input = new long[enemy];
    
    for(int i = 0; i < enemy; i++){
      input[i] = Long.parseLong(string[i]);
    }
    Arrays.sort(input);
    while(pp > 0){
      enemy--;
      pp--;
    }
    long sum = 0;
    for(int i = 0; i < enemy; i++){
      sum += input[i];
    }
    
    
    System.out.println(sum);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int enemy = sc.nextInt();
    int pp = sc.nextInt();sc.nextLine();
    String[] string = sc.nextLine().split(" ");
    long[] input = new long[enemy];
    
    for(int i = 0; i < enemy; i++){
      input[i] = Long.parseLong(string[i]);
    }
    Arrays.sort(input);
    while(pp > 0){
      enemy--;
      pp--;
    }
    long sum = 0;
    for(int i = 0; i < enemy; i++){
      sum += input[i];
    }
    
    
    System.out.println(sum);
  } main {
    Scanner sc = new Scanner(System.in);
    int enemy = sc.nextInt();
    int pp = sc.nextInt();sc.nextLine();
    String[] string = sc.nextLine().split(" ");
    long[] input = new long[enemy];
    
    for(int i = 0; i < enemy; i++){
      input[i] = Long.parseLong(string[i]);
    }
    Arrays.sort(input);
    while(pp > 0){
      enemy--;
      pp--;
    }
    long sum = 0;
    for(int i = 0; i < enemy; i++){
      sum += input[i];
    }
    
    
    System.out.println(sum);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int enemy = sc.nextInt(); enemy sc.nextInt() sc.nextInt sc int pp = sc.nextInt(); pp sc.nextInt() sc.nextInt sc sc.nextLine() sc.nextLine sc String[] string = sc.nextLine().split(" "); string sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " long[] input = new long[enemy]; input new long[enemy] enemy for(int i = 0; i < enemy; i++){
      input[i] = Long.parseLong(string[i]);
    } int i = 0; int i = 0; i 0 i < enemy i enemy i++ i++ i {
      input[i] = Long.parseLong(string[i]);
    } {
      input[i] = Long.parseLong(string[i]);
    } input[i] = Long.parseLong(string[i]) input[i] input i Long.parseLong(string[i]) Long.parseLong Long string[i] string i Arrays.sort(input) Arrays.sort Arrays input while(pp > 0){
      enemy--;
      pp--;
    } pp > 0 pp 0 {
      enemy--;
      pp--;
    } enemy-- enemy pp-- pp long sum = 0; sum 0 for(int i = 0; i < enemy; i++){
      sum += input[i];
    } int i = 0; int i = 0; i 0 i < enemy i enemy i++ i++ i {
      sum += input[i];
    } {
      sum += input[i];
    } sum += input[i] sum input[i] input 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 sc = new Scanner(System.in);
    int enemy = sc.nextInt();
    int pp = sc.nextInt();sc.nextLine();
    String[] string = sc.nextLine().split(" ");
    long[] input = new long[enemy];
    
    for(int i = 0; i < enemy; i++){
      input[i] = Long.parseLong(string[i]);
    }
    Arrays.sort(input);
    while(pp > 0){
      enemy--;
      pp--;
    }
    long sum = 0;
    for(int i = 0; i < enemy; i++){
      sum += input[i];
    }
    
    
    System.out.println(sum);
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int enemy = sc.nextInt();
    int pp = sc.nextInt();sc.nextLine();
    String[] string = sc.nextLine().split(" ");
    long[] input = new long[enemy];
    
    for(int i = 0; i < enemy; i++){
      input[i] = Long.parseLong(string[i]);
    }
    Arrays.sort(input);
    while(pp > 0){
      enemy--;
      pp--;
    }
    long sum = 0;
    for(int i = 0; i < enemy; i++){
      sum += input[i];
    }
    
    
    System.out.println(sum);
  }
} Main
import java.util.*;
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    int enemy = sc.nextInt();
    int pp = sc.nextInt();sc.nextLine();
    String[] string = sc.nextLine().split(" ");
    long[] input = new long[enemy];
    
    for(int i = 0; i < enemy; i++){
      input[i] = Long.parseLong(string[i]);
    }
    Arrays.sort(input);
    while(pp > 0){
      enemy--;
      pp--;
    }
    long sum = 0;
    for(int i = 0; i < enemy; i++){
      sum += input[i];
    }
    
    
    System.out.println(sum);
  }
}