#include <iostream>
#include <cmath>
#include <fstream>
#include <sstream>
#include <set>
#include <vector>
#include <map>
#include <deque>
#include <stack>
#include <algorithm>
#include <string>
#include <time.h>

using namespace std;
int n,k,x,a[1000000];
long long sum = 0;


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

scanf("%d",&n);
scanf("%d",&k);
	for(int i=0;i<n;i++)
	scanf("%d",&a[i]);
		sort(a,a+n);
			for(int i=k;i<n;i++)
			sum+=a[i];
cout<<sum<<endl;
return 0;
}
