var
  N, i: integer;
  Code: word;
begin
  randomize;
  Val(ParamStr(1), N, Code);
  writeln(N);
  for i := 1 to N do begin
    if i > 1 then write(' ');
    write(random(10000+1));
  end;
  writeln;
end.