program Factorial;
var input: Word;
function Fact (n: word): NativeUInt;
begin
case n of
0: Fact := 0;
1: Fact := 1;
else Fact := n * Fact(n - 1)
end;
Write('Which Factorial to calculate? ');
ReadLn(input);
WriteLn(Fact(input));
end.