program Main;

{$APPTYPE CONSOLE}

uses
  SysUtils;
var i,j:longint;
    a:array[1..1000000] of longint;
    n,k,c:longint;
    sum:int64;      

BEGIN
  assign(input,'A.in');
  reset(input);
  assign(output,'A.out');
  rewrite(output);
  readln(n,k);

  for i:=1 to n do read(a[i]);

  for i:=1 to n-1 do
    for j:=i+1 to n do begin
      if a[i]>a[j] then begin
        c:=a[i];
        a[i]:=a[j];
        a[j]:=c;
      end;
    end;

  for i:=k+1 to n do sum:=sum+a[i];

  writeln(sum);

  close(output);
END.
