program gen_random2;

{$APPTYPE CONSOLE}

uses SysUtils;

const
	MAX_LEN = 100000;

var
  i, len: integer;
  num : string;
begin
	i:=1;
	while (FileExists(IntToStr(i)+'.in')) do inc(i);
	rewrite(output,IntToStr(i)+'.in');
	
  randomize;
  
  if paramcount>0 then len := strtoint(paramstr(1)) else len := random(MAX_LEN)+1;
  
  for i:=1 to len do num:= num+'2';
  
  writeln(num);
  
  sleep(20);
end.