#include #include #include using namespace std; #define ll long long #define P 1000000007 #define N 1000011 int cas,n,m,k,l,t; ll mi[N],inv[N]; ll ans; ll kmi(ll x,ll y){ ll s=1; while (y){ if (y&1)s=s*x%P; y>>=1; x=x*x%P; } return s; } int main(){ scanf("%d",&cas); mi[0]=1; for (int i=1;i>1;i++)ans=(ans+mi[n+1]*inv[i]%P*inv[i+1]%P*inv[n-i*2]%P)%P; ans=ans*kmi(n+1,P-2)%P; printf("%I64d\n",ans); } }