using System; using System.Collections.Generic; class P { static void Main(string[] _) { UInt64 n = UInt64.Parse(Console.ReadLine()); UInt64 r = 1; for (UInt64 i = n % 1000000007; i >= 1; i--) { if (i == 0) { r = 0; break; } r = r * i; if (1000000007 <= r) { r = r % 1000000007; } } Console.WriteLine(r); } }