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