#include using namespace std; #define MOD 1000007 typedef long long ll; int main(){ ll n; ll ans; cin >> n; n += 2; if(n % 2 == 1){ ans = (n/2)%MOD * (n/2 + 1)%MOD - 1; }else{ ans = (n/2)%MOD * (n/2)%MOD - 1; } cout << ans%MOD << endl; return 0; }