#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define ll long long #define INF (1 << 30) #define INFLL (1LL << 60) int main() { unsigned ll n,ans = 0; cin >> n; if(n % 2 == 0){ ans = ((n / 2 + 1) % 1000007) * ((n / 2) % 1000007); ans += (n / 2); ans = ans % 1000007; }else{ ans = ((n / 2 + 2) % 1000007) * ((n / 2) % 1000007); ans += (n / 2 + 2); ans = ans % 1000007 - 1; } cout << ans << endl; return 0; }