#include #include #define rep(i, n) for(long long i = 0; i < n; i++) #define ALL(v) (v).begin(), (v).end() #define rALL(v) (v).rbegin(), (v).rend() using namespace std; using lint = long long; using ld = long double; using mint = atcoder::modint; int main() { mint::set_mod(1000007); lint n; cin >> n; lint h = n / 2LL; mint ans = mint(h + 1) * mint(n - h) + h; cout << ans.val() << endl; }