#include using namespace std; #define INF_LL (ll)1e18 #define INF (int)1e9 #define REP(i, n) for(int i = 0;i < (n);i++) #define FOR(i, a, b) for(int i = (a);i < (b);i++) #define all(x) x.begin(),x.end() #define fs first #define sc second using int32 = int_fast32_t; using uint32 = uint_fast32_t; using int64 = int_fast64_t; using uint64 = uint_fast64_t; using PII = pair; using PLL = pair; const double eps = 1e-10; templateinline void chmin(A &a, B b){if(a > b) a = b;} templateinline void chmax(A &a, B b){if(a < b) a = b;} int64 N; int64 fact[412345] = {}; int64 _cat[212345] = {}, *cat=_cat+1;; const int64 mod = 1e9+7; int64 mpow(int64 a, int64 b){ if(b == 0) return 1; if(b%2) return a*mpow(a, b-1)%mod; int64 ret = mpow(a, b/2); return ret*ret%mod; } int64 comb(int64 a, int64 b){ if(a < 0 || b < 0) return 0; return fact[a]*mpow(fact[b], mod-2)%mod*mpow(fact[a-b], mod-2)%mod; } int main(void){ cin >> N; fact[0] = 1; REP(i, 412344){ fact[i+1] = (fact[i]*(i+1))%mod; } int64 x = N/2; int64 res = 0; int64 now = 0; REP(i, 200100){ cat[i] = comb(2*i, i)*mpow(i+1, mod-2)%mod; if(i) cat[i] = (cat[i]+cat[i-1])%mod; } for(int32 i = 0;i < N/2+1;i++){ res += comb(N+2*i, i); res -= 2*comb(N+2*i, i)*cat[x-i-1]%mod; res = (res+mod)%mod; } cout << res << endl; }