#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include using namespace std; #define REP(i,n) for(int i=0;(i)<(n);(i)++) unsigned const int MOD = 1000000007; int main() { int N; cin >> N; long long a[100005]; /*a[1] = 1; a[2] = 2; a[3] = 6; for (int i = 4;i <= N;i++) { a[i] = (a[i - 2] / (i - 2)) % MOD; a[i] = (a[i] + a[i - 1]) % MOD; a[i] = (a[i] * (i % MOD)) % MOD; }*/ long long sume, sumo; a[1] = 1; sume = 0; sumo = 1; for (int i = 2;i <= N;i++) { if (i % 2 == 0) { a[i] = (sumo * (i % MOD)) % MOD; sume += a[i]; } else { a[i] = (sume * (i % MOD)) % MOD; sumo += a[i]; } } cout << a[N] << endl; return 0; }