import java.util.*;

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

public class Main {
    public static void main(String[] args) throws Exception {
        
        Scanner scanner = new Scanner(System.in);
        
        long N = scanner.nextLong();
        long K = scanner.nextLong();
        long Sum = 0;
        List<Long> list = new ArrayList<Long>();
        
        for(long i=0; i<N; i++){
            
            long HP = scanner.nextLong();
            list.add(HP);
            
        }
        
        Collections.sort(list, Collections.reverseOrder());
        
        for(long i=K; i<N; i++){
            Sum += list.get((int)i);
        }
        
        System.out.println(Sum);
    }
}
