import java.util.Scanner;
import java.util.Arrays;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();
        String input2 = sc.nextLine();
        String[] inputs = input.split(" ", 0);
        String[] inputs2 = input2.split(" ", 0);
        int teki = Integer.parseInt(inputs[0]);
        int lethal = Integer.parseInt(inputs[1]);
        long[] tekiArr = new long[teki];
        for(int i = 0; i < teki; i++){
            tekiArr[i] = Integer.parseInt(inputs2[i]);
        }
        long count = 0;
        Arrays.sort(tekiArr);
        for(int i = teki-1; i >= 0; i--){
            if(lethal > 0){
                lethal--;
                continue;
            }
            count += tekiArr[i];
        } 
        System.out.println(count);
    }
} import java.util.Scanner; Scanner java.util import java.util.Arrays; Arrays java.util public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();
        String input2 = sc.nextLine();
        String[] inputs = input.split(" ", 0);
        String[] inputs2 = input2.split(" ", 0);
        int teki = Integer.parseInt(inputs[0]);
        int lethal = Integer.parseInt(inputs[1]);
        long[] tekiArr = new long[teki];
        for(int i = 0; i < teki; i++){
            tekiArr[i] = Integer.parseInt(inputs2[i]);
        }
        long count = 0;
        Arrays.sort(tekiArr);
        for(int i = teki-1; i >= 0; i--){
            if(lethal > 0){
                lethal--;
                continue;
            }
            count += tekiArr[i];
        } 
        System.out.println(count);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();
        String input2 = sc.nextLine();
        String[] inputs = input.split(" ", 0);
        String[] inputs2 = input2.split(" ", 0);
        int teki = Integer.parseInt(inputs[0]);
        int lethal = Integer.parseInt(inputs[1]);
        long[] tekiArr = new long[teki];
        for(int i = 0; i < teki; i++){
            tekiArr[i] = Integer.parseInt(inputs2[i]);
        }
        long count = 0;
        Arrays.sort(tekiArr);
        for(int i = teki-1; i >= 0; i--){
            if(lethal > 0){
                lethal--;
                continue;
            }
            count += tekiArr[i];
        } 
        System.out.println(count);
    } main {
        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();
        String input2 = sc.nextLine();
        String[] inputs = input.split(" ", 0);
        String[] inputs2 = input2.split(" ", 0);
        int teki = Integer.parseInt(inputs[0]);
        int lethal = Integer.parseInt(inputs[1]);
        long[] tekiArr = new long[teki];
        for(int i = 0; i < teki; i++){
            tekiArr[i] = Integer.parseInt(inputs2[i]);
        }
        long count = 0;
        Arrays.sort(tekiArr);
        for(int i = teki-1; i >= 0; i--){
            if(lethal > 0){
                lethal--;
                continue;
            }
            count += tekiArr[i];
        } 
        System.out.println(count);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.nextLine(); input sc.nextLine() sc.nextLine sc String input2 = sc.nextLine(); input2 sc.nextLine() sc.nextLine sc String[] inputs = input.split(" ", 0); inputs input.split(" ", 0) input.split input " " 0 String[] inputs2 = input2.split(" ", 0); inputs2 input2.split(" ", 0) input2.split input2 " " 0 int teki = Integer.parseInt(inputs[0]); teki Integer.parseInt(inputs[0]) Integer.parseInt Integer inputs[0] inputs 0 int lethal = Integer.parseInt(inputs[1]); lethal Integer.parseInt(inputs[1]) Integer.parseInt Integer inputs[1] inputs 1 long[] tekiArr = new long[teki]; tekiArr new long[teki] teki for(int i = 0; i < teki; i++){
            tekiArr[i] = Integer.parseInt(inputs2[i]);
        } int i = 0; int i = 0; i 0 i < teki i teki i++ i++ i {
            tekiArr[i] = Integer.parseInt(inputs2[i]);
        } {
            tekiArr[i] = Integer.parseInt(inputs2[i]);
        } tekiArr[i] = Integer.parseInt(inputs2[i]) tekiArr[i] tekiArr i Integer.parseInt(inputs2[i]) Integer.parseInt Integer inputs2[i] inputs2 i long count = 0; count 0 Arrays.sort(tekiArr) Arrays.sort Arrays tekiArr for(int i = teki-1; i >= 0; i--){
            if(lethal > 0){
                lethal--;
                continue;
            }
            count += tekiArr[i];
        } int i = teki-1; int i = teki-1; i teki-1 teki 1 i >= 0 i 0 i-- i-- i {
            if(lethal > 0){
                lethal--;
                continue;
            }
            count += tekiArr[i];
        } {
            if(lethal > 0){
                lethal--;
                continue;
            }
            count += tekiArr[i];
        } if(lethal > 0){
                lethal--;
                continue;
            } lethal > 0 lethal 0 {
                lethal--;
                continue;
            } lethal-- lethal continue; count += tekiArr[i] count tekiArr[i] tekiArr i System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();
        String input2 = sc.nextLine();
        String[] inputs = input.split(" ", 0);
        String[] inputs2 = input2.split(" ", 0);
        int teki = Integer.parseInt(inputs[0]);
        int lethal = Integer.parseInt(inputs[1]);
        long[] tekiArr = new long[teki];
        for(int i = 0; i < teki; i++){
            tekiArr[i] = Integer.parseInt(inputs2[i]);
        }
        long count = 0;
        Arrays.sort(tekiArr);
        for(int i = teki-1; i >= 0; i--){
            if(lethal > 0){
                lethal--;
                continue;
            }
            count += tekiArr[i];
        } 
        System.out.println(count);
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();
        String input2 = sc.nextLine();
        String[] inputs = input.split(" ", 0);
        String[] inputs2 = input2.split(" ", 0);
        int teki = Integer.parseInt(inputs[0]);
        int lethal = Integer.parseInt(inputs[1]);
        long[] tekiArr = new long[teki];
        for(int i = 0; i < teki; i++){
            tekiArr[i] = Integer.parseInt(inputs2[i]);
        }
        long count = 0;
        Arrays.sort(tekiArr);
        for(int i = teki-1; i >= 0; i--){
            if(lethal > 0){
                lethal--;
                continue;
            }
            count += tekiArr[i];
        } 
        System.out.println(count);
    }
} Main
import java.util.Scanner;
import java.util.Arrays;
public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String input = sc.nextLine();
        String input2 = sc.nextLine();
        String[] inputs = input.split(" ", 0);
        String[] inputs2 = input2.split(" ", 0);
        int teki = Integer.parseInt(inputs[0]);
        int lethal = Integer.parseInt(inputs[1]);
        long[] tekiArr = new long[teki];
        for(int i = 0; i < teki; i++){
            tekiArr[i] = Integer.parseInt(inputs2[i]);
        }
        long count = 0;
        Arrays.sort(tekiArr);
        for(int i = teki-1; i >= 0; i--){
            if(lethal > 0){
                lethal--;
                continue;
            }
            count += tekiArr[i];
        } 
        System.out.println(count);
    }
}