#include int main() { long N; long a, b; long ans; std::cin >> N; a = N / 2; b = N - a; a += 1; b += 1; a %= 1000007; b %= 1000007; ans = a * b - 1; ans %= 1000007; std::cout << ans << std::endl; return 0; }