import java.util.*;
public class Main {
    public static void main(String [] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<Long> List = new ArrayList<>();
        long N = sc.nextLong();
        long K = sc.nextLong();
        for(int i=0;i<N;i++) List.add(sc.nextLong());
        Collections.sort(List,Collections.reverseOrder());
        long sum = 0;
        for(long i=K;i<List.size();i++) sum+=List.get((int)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);
        ArrayList<Long> List = new ArrayList<>();
        long N = sc.nextLong();
        long K = sc.nextLong();
        for(int i=0;i<N;i++) List.add(sc.nextLong());
        Collections.sort(List,Collections.reverseOrder());
        long sum = 0;
        for(long i=K;i<List.size();i++) sum+=List.get((int)i);
        System.out.println(sum);
    }
} Main public static void main(String [] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<Long> List = new ArrayList<>();
        long N = sc.nextLong();
        long K = sc.nextLong();
        for(int i=0;i<N;i++) List.add(sc.nextLong());
        Collections.sort(List,Collections.reverseOrder());
        long sum = 0;
        for(long i=K;i<List.size();i++) sum+=List.get((int)i);
        System.out.println(sum);
    } main {
        Scanner sc = new Scanner(System.in);
        ArrayList<Long> List = new ArrayList<>();
        long N = sc.nextLong();
        long K = sc.nextLong();
        for(int i=0;i<N;i++) List.add(sc.nextLong());
        Collections.sort(List,Collections.reverseOrder());
        long sum = 0;
        for(long i=K;i<List.size();i++) sum+=List.get((int)i);
        System.out.println(sum);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayList<Long> List = new ArrayList<>(); List new ArrayList<>() long N = sc.nextLong(); N sc.nextLong() sc.nextLong sc long K = sc.nextLong(); K sc.nextLong() sc.nextLong sc for(int i=0;i<N;i++) List.add(sc.nextLong()); int i=0; int i=0; i 0 i<N i N i++ i++ i List.add(sc.nextLong()); List.add(sc.nextLong()) List.add List sc.nextLong() sc.nextLong sc Collections.sort(List,Collections.reverseOrder()) Collections.sort Collections List Collections.reverseOrder() Collections.reverseOrder Collections long sum = 0; sum 0 for(long i=K;i<List.size();i++) sum+=List.get((int)i); long i=K; long i=K; i K i<List.size() i List.size() List.size List i++ i++ i sum+=List.get((int)i); sum+=List.get((int)i) sum List.get((int)i) List.get List (int)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);
        ArrayList<Long> List = new ArrayList<>();
        long N = sc.nextLong();
        long K = sc.nextLong();
        for(int i=0;i<N;i++) List.add(sc.nextLong());
        Collections.sort(List,Collections.reverseOrder());
        long sum = 0;
        for(long i=K;i<List.size();i++) sum+=List.get((int)i);
        System.out.println(sum);
    }
} public class Main {
    public static void main(String [] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<Long> List = new ArrayList<>();
        long N = sc.nextLong();
        long K = sc.nextLong();
        for(int i=0;i<N;i++) List.add(sc.nextLong());
        Collections.sort(List,Collections.reverseOrder());
        long sum = 0;
        for(long i=K;i<List.size();i++) sum+=List.get((int)i);
        System.out.println(sum);
    }
} Main
import java.util.*;
public class Main {
    public static void main(String [] args) {
        Scanner sc = new Scanner(System.in);
        ArrayList<Long> List = new ArrayList<>();
        long N = sc.nextLong();
        long K = sc.nextLong();
        for(int i=0;i<N;i++) List.add(sc.nextLong());
        Collections.sort(List,Collections.reverseOrder());
        long sum = 0;
        for(long i=K;i<List.size();i++) sum+=List.get((int)i);
        System.out.println(sum);
    }
}