var
  k,n,s,x,i,c:longint;
  a:array[1..1000000] of longint;
procedure sort;
begin
   for i:=1 to n do
      read(a[i]);
   repeat
   x:=0;
      For i:=1 to (n-1) do
      If a[i]>a[i+1] then begin
         c:=a[i];
         a[i]:=a[i+1];
         a[i+1]:=c;
         x:=1;
      end;
   until x=0;
   s:=0;
   For i:=k+1 to n do
      s:=s+a[i];
end;                     
begin
  assign(input,'input.txt');
  reset(input);
  assign(output,'output.txt');
  rewrite(output);
  read(n,k);
  sort;
  write(s);
  close(input);          
  close(output);
  
end.