using System; using System.Linq; using System.Text; using System.Numerics; using System.Collections; using System.Collections.Generic; public class Program { static int MOD = 1000000007; static Dictionary memo = new Dictionary() { {1, 1} }; static long f (int n) { if (memo.ContainsKey(n)) { return memo[n]; } long s = 0; for (int i = 1; i < n; ++i) { if (n % 2 == 0 && i % 2 == 1) { s = (s + f(i)) % MOD; } else if (n % 2 == 1 && i % 2 == 0) { s = (s + f(i)) % MOD; } } memo.Add(n, (s * n) % MOD); return memo[n]; } static void Main (string[] args) { int N = int.Parse(Console.ReadLine()); Console.WriteLine(f(N)); } }