using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; class Program { static long LPow (long x, long n) { if (n == 0) return 1; return x * LPow(x, n - 1); } static void Main(string[] args) { long n = Int64.Parse( Console.ReadLine() ); long aa = LPow(10, 18); long ans = 1; long r1, r2, n2; long m = LPow(10, 9) + 7; Math.DivRem(n, m, out n2); for (int i = 1; i < n2 + 1; i++) { Math.DivRem(ans, m, out r1); Math.DivRem(i, m, out r2); ans = r1 * r2; } long result; Math.DivRem(ans, m, out result); Console.WriteLine(result); } }