#include using LL = long long; const int N = 2e6 + 7; const int MOD = 1e9 + 7; int fac[N], ifc[N], n, m, k; int pow(int x, int y) { int ret = 1; while(y) { if(y & 1) ret = 1LL * ret * x % MOD; x = 1LL * x * x % MOD; y >>= 1; } return ret; } int com(int x, int y) { return x >= y && y >= 0 ? 1LL * fac[x] * ifc[y] % MOD * ifc[x - y] % MOD : 0; } int main() { fac[0] = 1; for(int i = 1; i < N; ++i) fac[i] = 1LL * fac[i - 1] * i % MOD; ifc[N - 1] = pow(fac[N - 1], MOD - 2); for(int i = N - 2; i >= 0; --i) ifc[i] = 1LL * ifc[i + 1] * (i + 1) % MOD; scanf("%d", &n); int ans = 0; for(int i = 0; i <= n / 2; ++i) ans = (ans + com(n + 2 * i - 1, i) - com(n + 2 * i - 1, n + i)) % MOD; printf("%d\n", (ans + MOD) % MOD); return 0; }