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