#include <iostream>
#include <set>
#include <vector>

using namespace std;

int main(){

  freopen("A.in", "r", stdin); 
  freopen("A.out", "w", stdout);

  int k,n,tmp;

  cin >> n >> k;

  multiset<int> a;
  for(int i = 0; i < n; i++)
  {
    cin >> tmp;
    a.insert(tmp);
  }

  int sum = 0;
  vector <int> b(a.size());
  copy(a.begin(), a.end(), b.begin());
  for(int i = k; i < b.size(); i++){
     sum += b[i];  
  }

  cout << sum << endl;

  return 0;
}
