#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef pair P; #define MOD 1000000007 // 10^9 + 7 #define INF 1000000000 // 10^9 #define LLINF 1LL<<60 ll dp[10000009]; ll com(ll n) { ll res = n * (2 * n - 1); res %= MOD; return res; } int main() { cin.tie(0); ios::sync_with_stdio(false); ll N; cin >> N; dp[1] = 1; for (ll i = 2; i <= N; i++) { dp[i] = com(i)*dp[i - 1]; dp[i] %= MOD; } cout << dp[N] << endl; return 0; }