#include "bits/stdc++.h" using namespace std; long long mod = (long long)1e6 + 7; int main(){ long long N; cin >> N; N %= mod; cout << (((N + 3) / 2) * ((N + 2) / 2) + mod - 1) % mod << endl; }