#include using namespace std; long long int a[100005]; const long long int MOD = 1e9 + 7; int main(void) { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; long long int odd = 1; long long int even = 0; a[1] = 1; for (int i = 2; i <= n; i++) { if (i % 2 == 0) { a[i] = i * odd; a[i] %= MOD; even += a[i]; even %= MOD; } else { a[i] = i * even; a[i] %= MOD; odd += a[i]; odd %= MOD; } } cout << a[n] << '\n'; return 0; }