#include <iostream>
#include <cstdio>
using namespace std;

int main(){
  freopen("A.in","r",stdin);
  freopen("A.out","w",stdout);
  int N,k;
  cin>>N>>k;
  int a[N];
  for(int i=0; i<N; i++)
    cin>>a[i];
  int j=N-1,sum=0;
  sort(a,a+N);
  for(int i=k; i<N; i++)
  {
   sum+=a[i];
 }
  cout<<sum;

  return 0;
}