#include <iostream>
#include <algorithm>
using namespace std;
int a[1000010];
int main()
{
freopen("A.in","r",stdin);
freopen("A.out","w",stdout);
int n=0,k=0;
cin >> n >> k;
for (int i=0;i<n;i++) scanf("%d",&a[i]);
sort(a,a+n);
long long sum = 0;
for (int i=k;i<n;i++) sum+=a[i];
cout << sum;

return 0;
}

