program abc(input,output);
var n,k,i,j,m:longint;
a:array [1..10000] of longint;
begin
i:=0;
assign(input, 'A.in');
assign(output, 'A.out');
reset (input);
rewrite (output);
read (input, n, k);
readln (input);
for i:=1 to n do
read (input, a[i]);
for j:=1 to n do
for i:=1 to n-1 do
    if a[i]>a[i+1] then
       begin
       m:=a[i];
       a[i]:=a[i+1];
       a[i+1]:=m;
       end;
m:=0;
for i:=k+1 to n do
    m:=m+a[i];
write (output, m);
close (input);
close (output);
end.