import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        Integer[] h = new Integer[n];
        for(int i = 0; i < n; i++) h[i] = scan.nextInt();
        Arrays.sort(h, Comparator.reverseOrder());
        try{for(int i = 0; i < k; i++) h[i] = 0;}catch(Exception e){}
        long out = 0;
        for(int i = 0; i < n; i++) out += h[i];
        System.out.println(out);
        scan.close();
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        Integer[] h = new Integer[n];
        for(int i = 0; i < n; i++) h[i] = scan.nextInt();
        Arrays.sort(h, Comparator.reverseOrder());
        try{for(int i = 0; i < k; i++) h[i] = 0;}catch(Exception e){}
        long out = 0;
        for(int i = 0; i < n; i++) out += h[i];
        System.out.println(out);
        scan.close();
    }
} Main public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        Integer[] h = new Integer[n];
        for(int i = 0; i < n; i++) h[i] = scan.nextInt();
        Arrays.sort(h, Comparator.reverseOrder());
        try{for(int i = 0; i < k; i++) h[i] = 0;}catch(Exception e){}
        long out = 0;
        for(int i = 0; i < n; i++) out += h[i];
        System.out.println(out);
        scan.close();
    } main {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        Integer[] h = new Integer[n];
        for(int i = 0; i < n; i++) h[i] = scan.nextInt();
        Arrays.sort(h, Comparator.reverseOrder());
        try{for(int i = 0; i < k; i++) h[i] = 0;}catch(Exception e){}
        long out = 0;
        for(int i = 0; i < n; i++) out += h[i];
        System.out.println(out);
        scan.close();
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int k = scan.nextInt(); k scan.nextInt() scan.nextInt scan Integer[] h = new Integer[n]; h new Integer[n] n for(int i = 0; i < n; i++) h[i] = scan.nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i h[i] = scan.nextInt(); h[i] = scan.nextInt() h[i] h i scan.nextInt() scan.nextInt scan Arrays.sort(h, Comparator.reverseOrder()) Arrays.sort Arrays h Comparator.reverseOrder() Comparator.reverseOrder Comparator try{for(int i = 0; i < k; i++) h[i] = 0;}catch(Exception e){} catch(Exception e){} Exception e {} {for(int i = 0; i < k; i++) h[i] = 0;} for(int i = 0; i < k; i++) h[i] = 0; int i = 0; int i = 0; i 0 i < k i k i++ i++ i h[i] = 0; h[i] = 0 h[i] h i 0 long out = 0; out 0 for(int i = 0; i < n; i++) out += h[i]; int i = 0; int i = 0; i 0 i < n i n i++ i++ i out += h[i]; out += h[i] out h[i] h i System.out.println(out) System.out.println System.out System System.out out scan.close() scan.close scan String[] args args public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        Integer[] h = new Integer[n];
        for(int i = 0; i < n; i++) h[i] = scan.nextInt();
        Arrays.sort(h, Comparator.reverseOrder());
        try{for(int i = 0; i < k; i++) h[i] = 0;}catch(Exception e){}
        long out = 0;
        for(int i = 0; i < n; i++) out += h[i];
        System.out.println(out);
        scan.close();
    }
} public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        Integer[] h = new Integer[n];
        for(int i = 0; i < n; i++) h[i] = scan.nextInt();
        Arrays.sort(h, Comparator.reverseOrder());
        try{for(int i = 0; i < k; i++) h[i] = 0;}catch(Exception e){}
        long out = 0;
        for(int i = 0; i < n; i++) out += h[i];
        System.out.println(out);
        scan.close();
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int k = scan.nextInt();
        Integer[] h = new Integer[n];
        for(int i = 0; i < n; i++) h[i] = scan.nextInt();
        Arrays.sort(h, Comparator.reverseOrder());
        try{for(int i = 0; i < k; i++) h[i] = 0;}catch(Exception e){}
        long out = 0;
        for(int i = 0; i < n; i++) out += h[i];
        System.out.println(out);
        scan.close();
    }
}