#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define llong long long int main() { int n; cin >> n; int upper = n / 2; int lower = n / 2 + n % 2; llong result = (llong)(lower + 1) % 1000007 * upper % 1000007 + lower; cout << result % 1000007 << "\n"; }