program a;

{$APPTYPE CONSOLE}

uses
  SysUtils;
  var
  n,k:longint;
  b:array [1..1000000] of longint;
 buf,s,i,j:longint;
begin
assign(input,'a.in');
reset(input);
assign(output,'a.out');
rewrite(output);
readln(n,k);
for i:=1 to n do
read(b[i]);
  {sortirovka}
for i:=1 to n-1 do
  for j:=1 to n-i do
  begin
  if b[j]>b[j+1] then
  begin
  buf:=b[j];
  b[j]:=b[j+1];
  b[j+1]:=buf;
  end;
  end;
   s:=0;
   for i:=k+1 to n do
   s:=s+b[i];
   write(s);
   close(output);
end.
