#include using namespace std; const int MOD = int(1e9) + 7; int main() { ios::sync_with_stdio(false); int n; cin >> n; int odd = 1, even = 0; for (int i = 2; i <= n; ++i) { if (i & 1) { odd = (odd + 1LL * i * even) % MOD; } else { even = (even + 1LL * i * odd) % MOD; } } if (n & 1) cout << odd << endl; else cout << even << endl; return 0; }