#include #include #include #include #include using namespace std; typedef long long ll; const ll MOD = 1000000007; const int N_MAX = 10; ll inv[N_MAX],fac[N_MAX],finv[N_MAX]; void init(){ fac[0]=fac[1]=1; finv[0]=finv[1]=1; inv[1]=1; for(int i=2;i> N; N -= 4; init(); ll ans = 0; ll k = N/6; k %= MOD; ll M = N-3; ll p = M/6; ll l = N/2+1; ll r = (N-k*6)/2+1; l %= MOD; r %= MOD; //cout << l << ' ' << r << endl; k %= MOD; p %= MOD; ans += (((l+r)*(k+1))%MOD)*inv[2]; ans %= MOD; if(M >= 0){ l = M/2+1; r = (M-p*6)/2+1; l %= MOD; r %= MOD; //cout << l << ' ' << r << endl; ans += (((l+r)*(p+1))%MOD)*inv[2]; ans %= MOD; } cout << ans << endl; }