#include <bits/stdc++.h>
using namespace std;
long long n,k,arr[200005],ans;
int main() {
cin>>k>>n;
for(int i=1;i<=k;i++){
cin>>arr[i];
}
sort(arr+1,arr+1+k,greater<int>());
for(int i=n+1;i<=k;i++){
ans+=arr[i];
}
cout<<ans;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmxvbmcgbG9uZyBuLGssYXJyWzIwMDAwNV0sYW5zOwppbnQgbWFpbigpIHsKCWNpbj4+az4+bjsKCWZvcihpbnQgaT0xO2k8PWs7aSsrKXsKCQljaW4+PmFycltpXTsKCX0KCXNvcnQoYXJyKzEsYXJyKzErayxncmVhdGVyPGludD4oKSk7Cglmb3IoaW50IGk9bisxO2k8PWs7aSsrKXsKCQlhbnMrPWFycltpXTsKCX0KCWNvdXQ8PGFuczsKCXJldHVybiAwOwp9