using System; public class Hello { public static void Main() { var n = long.Parse(Console.ReadLine().Trim()); if (n >= 50) Console.WriteLine(new string('0', 12)); else if (n == 1) Console.WriteLine(1); else Console.WriteLine(getAns((int)n)); } public static string getAns(int n) { var ansnum = 1L; var t = ""; for (int i = 2; i <= n; i++) { ansnum *= i; t = ansnum.ToString(); if (t.Length >= 13) { t = t.Substring(t.Length - 12); ansnum = long.Parse(t); } } return t; } }