#include using lint = long long; constexpr lint MOD = 1000007; void solve() { lint n; std::cin >> n; std::cout << (((n / 2 + 1) % MOD) * ((n - n / 2 + 1) % MOD) + MOD - 1) % MOD << std::endl; } int main() { std::cin.tie(nullptr); std::ios::sync_with_stdio(false); solve(); return 0; }