#include <cstdio>
#include <iostream>
#define MAXN 1000001
using namespace std;

int n,k;
long f[MAXN];

void  sort(int ll, int rr){
	int i = ll, j = rr, d = f[(i+j)/2], c;
	do{
		while (f[i] < d)i++;
		while (f[j] > d)j--;
		if (i <= j){ c = f[i]; f[i] = f[j]; f[j] =c; i++; j--;}
	}while(i<j);
	if (i < rr) sort(i,rr);
	if (ll < j) sort(ll,j);
}

int main(){
	freopen("A.in","r",stdin); freopen("A.out","w",stdout);
	scanf("%d %d",&n,&k);
	for (int i = 0; i < n; i++) scanf("%d",&f[i]);
	sort(0,n-1);
	__int64 sum = 0;
	for (int i = k; i < n; i++) sum = sum + f[i];
	cout << sum <<endl;
	fclose(stdin); fclose(stdout);
	return 0;       
}