var n,k,i,s,j:longint;
    a:array[1..1000000] of longint;
  procedure qsort(l,r:longint);
   var x,y,i,j:longint;
    begin
      i:=l; j:=r;
       x:=a[(l+r) div 2];
        repeat
         while a[i]<x do inc(i);
         while a[j]>x do dec(j);
          if i<=j then begin
                       y:=a[i];
                       a[i]:=a[j];
 		       a[j]:=y;
                       inc(i);
                       dec(j);
                       end;
         until i>j;
          if i<r then qsort(i,r);
          if l<j then qsort(l,j);
      end;
begin
 assign(input,'A.in'); reset(input);
 assign(output,'A.out'); rewrite(output);
 read(n,k);
s:=0;
 for i:=1 to n do
 read(a[i]);
 qsort(1,n);
 for j:=k+1 to n do
 begin 
 s:=s+a[j];
 end;
write(s);

close(output);
end.