#include using namespace std; #define int long long signed main(){ long long N; cin >> N; N %= 1000000 + 7; cout << ( ( N / 2 + 1 ) * ( N - N / 2 + 1 ) - 1 ) % ( 1000000 + 7 ) << endl; return 0; }