
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collections;
import java.util.PriorityQueue;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int Hissatu = scanner.nextInt();

        ArrayList<BigInteger> monsters = new ArrayList<>();
        for(int i=0;i<N;i++) {
            monsters.add(scanner.nextBigInteger());
        }

        //except
        if(Hissatu >= N){
            System.out.println(0);
            return;
        }

        PriorityQueue<BigInteger> queue = new PriorityQueue<>(Collections.reverseOrder());
        for(BigInteger h : monsters){
            queue.add(h);
        }

        for(int i=0;i<Hissatu;i++){
            queue.poll();
        }

        BigInteger answer = BigInteger.ZERO;
        for(BigInteger health : queue){
            answer = answer.add(health);
        }

        System.out.println(answer);
    }
} import java.math.BigInteger; BigInteger java.math import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.PriorityQueue; PriorityQueue java.util import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int Hissatu = scanner.nextInt();

        ArrayList<BigInteger> monsters = new ArrayList<>();
        for(int i=0;i<N;i++) {
            monsters.add(scanner.nextBigInteger());
        }

        //except
        if(Hissatu >= N){
            System.out.println(0);
            return;
        }

        PriorityQueue<BigInteger> queue = new PriorityQueue<>(Collections.reverseOrder());
        for(BigInteger h : monsters){
            queue.add(h);
        }

        for(int i=0;i<Hissatu;i++){
            queue.poll();
        }

        BigInteger answer = BigInteger.ZERO;
        for(BigInteger health : queue){
            answer = answer.add(health);
        }

        System.out.println(answer);
    }
} Main public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int Hissatu = scanner.nextInt();

        ArrayList<BigInteger> monsters = new ArrayList<>();
        for(int i=0;i<N;i++) {
            monsters.add(scanner.nextBigInteger());
        }

        //except
        if(Hissatu >= N){
            System.out.println(0);
            return;
        }

        PriorityQueue<BigInteger> queue = new PriorityQueue<>(Collections.reverseOrder());
        for(BigInteger h : monsters){
            queue.add(h);
        }

        for(int i=0;i<Hissatu;i++){
            queue.poll();
        }

        BigInteger answer = BigInteger.ZERO;
        for(BigInteger health : queue){
            answer = answer.add(health);
        }

        System.out.println(answer);
    } main {

        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int Hissatu = scanner.nextInt();

        ArrayList<BigInteger> monsters = new ArrayList<>();
        for(int i=0;i<N;i++) {
            monsters.add(scanner.nextBigInteger());
        }

        //except
        if(Hissatu >= N){
            System.out.println(0);
            return;
        }

        PriorityQueue<BigInteger> queue = new PriorityQueue<>(Collections.reverseOrder());
        for(BigInteger h : monsters){
            queue.add(h);
        }

        for(int i=0;i<Hissatu;i++){
            queue.poll();
        }

        BigInteger answer = BigInteger.ZERO;
        for(BigInteger health : queue){
            answer = answer.add(health);
        }

        System.out.println(answer);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) int N = scanner.nextInt(); N scanner.nextInt() scanner.nextInt scanner int Hissatu = scanner.nextInt(); Hissatu scanner.nextInt() scanner.nextInt scanner ArrayList<BigInteger> monsters = new ArrayList<>(); monsters new ArrayList<>() for(int i=0;i<N;i++) {
            monsters.add(scanner.nextBigInteger());
        } int i=0; int i=0; i 0 i<N i N i++ i++ i {
            monsters.add(scanner.nextBigInteger());
        } {
            monsters.add(scanner.nextBigInteger());
        } monsters.add(scanner.nextBigInteger()) monsters.add monsters scanner.nextBigInteger() scanner.nextBigInteger scanner if(Hissatu >= N){
            System.out.println(0);
            return;
        } Hissatu >= N Hissatu N {
            System.out.println(0);
            return;
        } System.out.println(0) System.out.println System.out System System.out 0 return; PriorityQueue<BigInteger> queue = new PriorityQueue<>(Collections.reverseOrder()); queue new PriorityQueue<>(Collections.reverseOrder()) for(BigInteger h : monsters){
            queue.add(h);
        } BigInteger h monsters {
            queue.add(h);
        } {
            queue.add(h);
        } queue.add(h) queue.add queue h for(int i=0;i<Hissatu;i++){
            queue.poll();
        } int i=0; int i=0; i 0 i<Hissatu i Hissatu i++ i++ i {
            queue.poll();
        } {
            queue.poll();
        } queue.poll() queue.poll queue BigInteger answer = BigInteger.ZERO; answer BigInteger.ZERO BigInteger BigInteger.ZERO for(BigInteger health : queue){
            answer = answer.add(health);
        } BigInteger health queue {
            answer = answer.add(health);
        } {
            answer = answer.add(health);
        } answer = answer.add(health) answer answer.add(health) answer.add answer health System.out.println(answer) System.out.println System.out System System.out answer String[] args args public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int Hissatu = scanner.nextInt();

        ArrayList<BigInteger> monsters = new ArrayList<>();
        for(int i=0;i<N;i++) {
            monsters.add(scanner.nextBigInteger());
        }

        //except
        if(Hissatu >= N){
            System.out.println(0);
            return;
        }

        PriorityQueue<BigInteger> queue = new PriorityQueue<>(Collections.reverseOrder());
        for(BigInteger h : monsters){
            queue.add(h);
        }

        for(int i=0;i<Hissatu;i++){
            queue.poll();
        }

        BigInteger answer = BigInteger.ZERO;
        for(BigInteger health : queue){
            answer = answer.add(health);
        }

        System.out.println(answer);
    }
} public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int Hissatu = scanner.nextInt();

        ArrayList<BigInteger> monsters = new ArrayList<>();
        for(int i=0;i<N;i++) {
            monsters.add(scanner.nextBigInteger());
        }

        //except
        if(Hissatu >= N){
            System.out.println(0);
            return;
        }

        PriorityQueue<BigInteger> queue = new PriorityQueue<>(Collections.reverseOrder());
        for(BigInteger h : monsters){
            queue.add(h);
        }

        for(int i=0;i<Hissatu;i++){
            queue.poll();
        }

        BigInteger answer = BigInteger.ZERO;
        for(BigInteger health : queue){
            answer = answer.add(health);
        }

        System.out.println(answer);
    }
} Main

import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Collections;
import java.util.PriorityQueue;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);

        int N = scanner.nextInt();
        int Hissatu = scanner.nextInt();

        ArrayList<BigInteger> monsters = new ArrayList<>();
        for(int i=0;i<N;i++) {
            monsters.add(scanner.nextBigInteger());
        }

        //except
        if(Hissatu >= N){
            System.out.println(0);
            return;
        }

        PriorityQueue<BigInteger> queue = new PriorityQueue<>(Collections.reverseOrder());
        for(BigInteger h : monsters){
            queue.add(h);
        }

        for(int i=0;i<Hissatu;i++){
            queue.poll();
        }

        BigInteger answer = BigInteger.ZERO;
        for(BigInteger health : queue){
            answer = answer.add(health);
        }

        System.out.println(answer);
    }
}