using System; public class Hello { public const int MOD = 1000000007; public static void Main() { var n = int.Parse(Console.ReadLine().Trim()); if (n == 1) { Console.WriteLine(1); goto end; } var b1 = 0L; var b2 = 0L; var ans = 1L; for (int i = 2; i <= n; i++) if (i % 2 == 0) { var w = (i * (ans + b2)) % MOD; b2 += ans; b2 %= MOD; ans = w; } else { var w = (i * (ans + b1)) % MOD; b1 += ans; b1 %= MOD; ans = w; } Console.WriteLine(ans); end:; } }