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