#include #include using namespace std; typedef long long ll; int main() { ll N; cin >> N; ll a = ((N / 2) + 1) % 1000007; ll b = (ll)(ceil((double)N / 2) + 1) % 1000007; cout << (a * b + 1000006) % 1000007 << endl; return 0; }