#include #include #include #include #include #include #include #include #include #include #include #include #include #include #define all(x) (x).begin(),(x).end() #define rall(x) (x).rbegin(),(x).rend() using namespace std; typedef long long ll; typedef pair pi; typedef pair pl; typedef pair plc; ll mod = 1e9 + 7; ll a[100010]; ll n,g_sum,k_sum = 1; int main() { cin >> n; a[1] = 1; for (int i = 2; i < n + 1; i++) { if (i % 2 == 0) { a[i] = i * k_sum %mod; g_sum += a[i]; g_sum %= mod; } else { a[i] = i * g_sum %mod; k_sum += a[i]; k_sum %= mod; } } cout << a[n] << endl; return 0; }