#include using namespace std; typedef long long LL; const int N = 100010, MOD = 1000000007; int n; LL a[N], s[2]; int main() { // freopen("seq.in", "r", stdin); // freopen("seq.out", "w", stdout); scanf("%d", &n); a[1] = s[1] = 1LL; for (int i = 2; i <= n; ++i) { if (i % 2 == 0) { a[i] = i * s[1] % MOD; (s[0] += a[i]) %= MOD; } else { a[i] = i * s[0] % MOD; (s[1] += a[i]) %= MOD; } } printf("%lld\n", a[n]); return 0; }