using System; using System.Collections.Generic; using System.Linq; namespace yukicoder { public class Program { public static void Main() { var n = long.Parse(Console.ReadLine()); if (n < 60) { Console.WriteLine(factorial(n)); } else { Console.WriteLine("000000000000"); } } static string factorial(long a) { long f = 1; var b = (long)Math.Pow(10, 12); var c = true; while (a > 0) { f *= a; if (f > b) { f %= b; c = false; } a--; } if (c) { return f.ToString(); } else { return f.ToString("000000000000"); } } } }