#include #include #include #include using namespace std; using ull = unsigned long long; #define Mod %1000000007 ull a(int n, std::vector& v) { if (n == 1) return 1; ull am = a(n - 1, v); v.emplace_back(am); for (int i = n - 3; i > 0; i -= 2) am += v[i - 1]; return n * (am Mod); } int main() { int n; cin >> n; std::vector v; cout << a(n, v)Mod << endl; return 0; }