#include #include #include #define N 1000005 #define mod 1000000007 using namespace std; typedef long long ll; ll cas,n,i,j; ll mi[N],ni[N]; ll ksm(ll x,ll y) { ll ans=1; while (y) { if (y%2)ans=ans*x%mod; x=x*x%mod; y>>=1; } return ans; } int main() { scanf("%I64d",&cas); mi[0]=1;for (i=1;i>1;i++) ans=(ans+mi[n+1]*ni[i]%mod*ni[i+1]%mod*ni[n-i*2]%mod)%mod; ans=ans*ksm(n+1,mod-2)%mod; printf("%I64d\n",ans); } }