var
	a : array[ 1..1100000 ] of longint;
	N , K , i : longint;
	sum : int64;

procedure qsort( l , r : longint );
var
	i , j , k , y : longint;

begin
 i := l;
 j := r;
 k := a[ ( l + r ) div 2 ];
 repeat
  while a[ i ] < k do
   inc( i );
  while a[ j ] > k 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 );
 readln( N , K );
 sum := 0;
 for i := 1 to N do
  read( a[ i ] );
 qsort( 1 , N );
 for i := K + 1 to N do
  sum := sum + a[ i ];
 writeln( sum );
 close( output );
end.             