import java.util.*;
public class Main
{
    public static void main(String[] args) 
    {
      Scanner s = new Scanner(System.in);
      int h = s.nextInt();
      int k = s.nextInt();
      
      Integer a[] = new Integer[h];
      long sum=0;
      for(int i = 0; i <= h-1 ;i++)
        {
            a[i] = s.nextInt();
        }
      Arrays.sort(a, Collections.reverseOrder()); 
       
      for(int j = k; j<h; j++ )
      {
        sum = sum + a[j];
      }
      System.out.println("" + sum);
    }
      
   
} import java.util.*; util.* java public class Main
{
    public static void main(String[] args) 
    {
      Scanner s = new Scanner(System.in);
      int h = s.nextInt();
      int k = s.nextInt();
      
      Integer a[] = new Integer[h];
      long sum=0;
      for(int i = 0; i <= h-1 ;i++)
        {
            a[i] = s.nextInt();
        }
      Arrays.sort(a, Collections.reverseOrder()); 
       
      for(int j = k; j<h; j++ )
      {
        sum = sum + a[j];
      }
      System.out.println("" + sum);
    }
      
   
} Main public static void main(String[] args) 
    {
      Scanner s = new Scanner(System.in);
      int h = s.nextInt();
      int k = s.nextInt();
      
      Integer a[] = new Integer[h];
      long sum=0;
      for(int i = 0; i <= h-1 ;i++)
        {
            a[i] = s.nextInt();
        }
      Arrays.sort(a, Collections.reverseOrder()); 
       
      for(int j = k; j<h; j++ )
      {
        sum = sum + a[j];
      }
      System.out.println("" + sum);
    } main {
      Scanner s = new Scanner(System.in);
      int h = s.nextInt();
      int k = s.nextInt();
      
      Integer a[] = new Integer[h];
      long sum=0;
      for(int i = 0; i <= h-1 ;i++)
        {
            a[i] = s.nextInt();
        }
      Arrays.sort(a, Collections.reverseOrder()); 
       
      for(int j = k; j<h; j++ )
      {
        sum = sum + a[j];
      }
      System.out.println("" + sum);
    } Scanner s = new Scanner(System.in); s new Scanner(System.in) int h = s.nextInt(); h s.nextInt() s.nextInt s int k = s.nextInt(); k s.nextInt() s.nextInt s Integer a[] = new Integer[h]; a new Integer[h] h long sum=0; sum 0 for(int i = 0; i <= h-1 ;i++)
        {
            a[i] = s.nextInt();
        } int i = 0; int i = 0; i 0 i <= h-1 i h-1 h 1 i++ i++ i {
            a[i] = s.nextInt();
        } {
            a[i] = s.nextInt();
        } a[i] = s.nextInt() a[i] a i s.nextInt() s.nextInt s Arrays.sort(a, Collections.reverseOrder()) Arrays.sort Arrays a Collections.reverseOrder() Collections.reverseOrder Collections for(int j = k; j<h; j++ )
      {
        sum = sum + a[j];
      } int j = k; int j = k; j k j<h j h j++ j++ j {
        sum = sum + a[j];
      } {
        sum = sum + a[j];
      } sum = sum + a[j] sum sum + a[j] sum a[j] a j System.out.println("" + sum) System.out.println System.out System System.out "" + sum "" sum String[] args args public class Main
{
    public static void main(String[] args) 
    {
      Scanner s = new Scanner(System.in);
      int h = s.nextInt();
      int k = s.nextInt();
      
      Integer a[] = new Integer[h];
      long sum=0;
      for(int i = 0; i <= h-1 ;i++)
        {
            a[i] = s.nextInt();
        }
      Arrays.sort(a, Collections.reverseOrder()); 
       
      for(int j = k; j<h; j++ )
      {
        sum = sum + a[j];
      }
      System.out.println("" + sum);
    }
      
   
} public class Main
{
    public static void main(String[] args) 
    {
      Scanner s = new Scanner(System.in);
      int h = s.nextInt();
      int k = s.nextInt();
      
      Integer a[] = new Integer[h];
      long sum=0;
      for(int i = 0; i <= h-1 ;i++)
        {
            a[i] = s.nextInt();
        }
      Arrays.sort(a, Collections.reverseOrder()); 
       
      for(int j = k; j<h; j++ )
      {
        sum = sum + a[j];
      }
      System.out.println("" + sum);
    }
      
   
} Main
import java.util.*;
public class Main
{
    public static void main(String[] args) 
    {
      Scanner s = new Scanner(System.in);
      int h = s.nextInt();
      int k = s.nextInt();
      
      Integer a[] = new Integer[h];
      long sum=0;
      for(int i = 0; i <= h-1 ;i++)
        {
            a[i] = s.nextInt();
        }
      Arrays.sort(a, Collections.reverseOrder()); 
       
      for(int j = k; j<h; j++ )
      {
        sum = sum + a[j];
      }
      System.out.println("" + sum);
    }
      
   
}