#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long int ll; typedef pair P; const ll MOD=1e9+7; ll powmod(ll a, ll k){ ll ap=a, ans=1; while(k>0){ if(k%2==1){ ans*=ap; ans%=MOD; } ap=ap*ap; ap%=MOD; k/=2; } return ans; } ll inv(ll a){ return powmod(a, MOD-2); } int main() { int n; cin>>n; ll f[400001]; f[0]=1; for(ll i=1; i<=2*n; i++) f[i]=f[i-1]*i%MOD; ll invf[400001]; invf[2*n]=inv(f[2*n]); for(ll i=2*n-1; i>=0; i--) invf[i]=invf[i+1]*(i+1)%MOD; ll ans=1; for(int i=1; i<=n/2; i++){ ans+=(f[n-1+2*i]*invf[i]%MOD*invf[n-1+i]%MOD); ans+=(MOD-f[n-1+2*i]*invf[i-1]%MOD*invf[n+i]%MOD); ans%=MOD; } cout<