program factorial_long; {$APPTYPE CONSOLE} var a,c:array[0..1000] of integer; n:integer; j,i:integer; f:text; des:integer; begin assign(f,'long2.dat'); reset(f); readln(f,n); close (f); assign(f,'long2.sol'); rewrite(f); a[0]:=1; a[1]:=1; c[0]:=a[0]; des:=0; for j:=1 to n do begin des:=0; for i:=1 to a[0] do begin c[i]:=(a[i]*j+des) mod 10; des:=(a[i]*j+des) div 10 ; end; if des>0 then begin c[0]:=c[0]+1;c[c[0]]:=des;end; for i:=0 to c[0] do a[i]:=c[i]; write(f,j,'--------'); for i:=c[0] downto 1 do write(f,c[i]); writeln(f); end; close(f); end.