#include using namespace std; const int M = int(1e9) + 7; int f[1 << 19], vf[1 << 19]; int int_pow(int v, int p) { int r = 1; for (int i = p; i; i >>= 1) { if (i & 1) r = 1LL * r * v % M; v = 1LL * v * v % M; } return r; } int cmb(int n, int m) { return 1LL * f[n] * vf[m] % M * vf[n - m] % M; } signed main() { ios::sync_with_stdio(false); int N; cin >> N; for (int i = f[0] = 1; i < 1 << 19; ++i) { f[i] = 1LL * f[i - 1] * i % M; } vf[(1 << 19) - 1] = int_pow(f[(1 << 19) - 1], M - 2); for (int i = (1 << 19) - 2; ~i; --i) { vf[i] = 1LL * vf[i + 1] * (i + 1) % M; } int ans = 1; for (int i = N + 2; i <= 2 * N; i += 2) { int r = i - N >> 1; (ans += (cmb(i - 1, r) - cmb(i - 1, r - 1)) % M) %= M; } if (ans < 0) ans += M; cout << ans << endl; return 0; }