Uses crt;
var i,n,z: longint;
begin clrscr;
readln(n);
z:=1;
while(i<n) do begin
i:=i+1;
z:=z*i;
end;
writeln(z);
readln;
end.
program TinhGiaiThua;
var n, giaiThua: integer;
begin
writeln('Nhap vao gia tri cua n (>0): ');
readln(n);
if n <= 0 then
begin
writeln('Gia tri cua n phai lon hon 0.');
exit;
end;
giaiThua := 1;
while n > 0 do
begin
giaiThua := giaiThua * n;
n := n - 1;
end;
writeln('Giai thua cua n la: ', giaiThua);
readln;
end.