#include using namespace std; const int mod = 1e9 + 7; const int MAX_N = 500000; const int MAX_N2 = MAX_N * 2 + 1; int64_t fact[MAX_N2]; int64_t revFact[MAX_N2]; int64_t invMod[MAX_N2]; int64_t powMod(int64_t x, int64_t y) { int64_t r = 1, a = x % mod; while (y) { if (y & 1) r = (r * a) % mod; a = a * a % mod; y /= 2; } return r; } void setup(int n) { fact[0] = 1; for (int i = 1; i < n; i++) { fact[i] = fact[i - 1] * i % mod; } revFact[n - 1] = powMod(fact[n - 1], mod - 2); for (int i = n - 2; i >= 0; i--) { revFact[i] = revFact[i + 1] * (i + 1) % mod; } } int64_t P(int n, int r) { return n >= r ? fact[n] * revFact[n - r] % mod : 0; } int64_t C(int n, int r) { return P(n, r) * revFact[r] % mod; } int64_t catalan(int n) { return fact[2 * n] * revFact[n] % mod * revFact[n] % mod * invMod[n + 1] % mod; } int64_t solve_oeis(int n) { int64_t ans = 0; int m = n / 2; for (int i = 0; i <= m; i++) { ans += C(n + 2 * i, i); } // n=10 で実験して、OEISから引っ張ってきた https://oeis.org/A030055 を元に構成した式 for (int i = 0; i < m; i++) { ans -= C(n + 2 * i + 1, i) * 2 % mod; ans += mod; } return ans % mod; } signed main() { int n; cin >> n; setup(n * 2 + 1); cout << solve_oeis(n) << endl; return 0; }