program problem_a;
{$APPTYPE CONSOLE}
const
      filein  = 'a.in';
      fileout = 'a.out';
      maxn    = 1000010;
var
      i,j,k,l,m,n             : longint;
      a                       : array [0..maxn] of extended;
      ans                     : extended;
procedure  sort(l,r:longint);
var
    i,j   : longint;
    x,y   : extended;
begin
  i:=l; j:=r; x:=a[(i+j)div 2];
  repeat
    while (i<r)and(a[i]<x) do inc(i);
    while (j>l)and(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 l<j then sort(l,j);
  if r>i then sort(i,r);
end;

begin
  reset(input,filein); rewrite(output,fileout);
    read(n,k);
      for i:=1 to n do read(a[i]);
    sort(1,n);
  ans:=0;
  for i:=k+1 to n do ans:=ans+a[i];
  writeln(ans:0:6);
end.
