#include #include #include #include #include #include #include #include #include #include using ll = long long; using namespace std; int main(){ ll n, n1, n2, ans, mod = 1e6+7; cin >> n; (!(n % 2)) ? (n1 = n/2) : (n1 = n/2 + 1); n1 %= mod; n2 = n - n1; n2 %= mod; cout << ((n2 + 1)*(n1 + 1)-1)%mod << endl; }