#include using namespace std; int mod = 1e9+7; int main() { int n; cin >> n; long long k = 0,g = 0; long long tmp = 1; k = 1; for(int i = 0; i < n-1; i++) { if(i%2 == 0) { tmp = (long long)(i+2)*k%mod; g += tmp; g %= mod; } else { tmp = (long long)(i+2)*g%mod; k += tmp; k %= mod; } } cout << tmp << endl; }