#include using namespace std; int main() { long long n, h, ans; cin >> n; h = n / 2 + 1; ans = (h*(h + 1) - 1) % 1000007; cout << ans << endl; return 0; }