#include #define rep(i, a, n) for(int i = a; i < n; i++) #define repb(i, a, b) for(int i = a; i >= b; i--) #define all(a) a.begin(), a.end() #define o(a) cout << a << endl #define int long long using namespace std; typedef pair P; const int mod = 1e9 + 7; signed main(){ int n; cin >> n; int odd = 1, even = 0; int now = 1; rep(i, 2, n + 1){ if(i % 2 == 0){ now = i * odd % mod; (even += now) %= mod; }else{ now = i * even % mod; (odd += now) %= mod; } } cout << now << endl; }