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