const
   n = 3000;
var
   i, j, t : integer;
   a : array [1..n] of integer;
begin
   for i := 1 to n do begin
      a[i] := i;
   end;
   for i := n downto 1 do begin
      j := random(i) + 1;
      t := a[i];
      a[i] := a[j];
      a[j] := t;
   end;
   writeln(n);
   for i := 1 to n do begin
      writeln(a[i]);
   end;
end.