using System; class FactorialProg{ public static BigInteger Factorial(int n){ if (n >= 0){ BigInteger res = 1; for(int i = 1; i <= n; i++) res = res * i; return res; } else throw new ArgumentException("n must be non-negative"); } public static void Main(){ Console.WriteLine("{0}! = {1}", 5, Factorial(5)); } }