#include "bits/stdc++.h" #define REP(i,n,N) for(ll i=(n); i<(N); i++) #define RREP(i,n,N) for(ll i=(N-1); i>=n; i--) #define CK(n,a,b) (a)<=(n)&&(n)<(b) #define p(s) cout<<(s)<<endl #define first F #define second S typedef long long ll; using namespace std; const ll mod =1e6+7; ll N; int main(){ while(cin>>N){ ll NN = N/2; ll NN2 = N-NN; NN%=mod; NN2%=mod; ll ans = (NN+1)*(NN2+1)-1; p(ans%mod); } }