#define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define eps 0.00000001 #define LONG_INF 10000000000000000 #define GOLD 1.61803398874989484820458 #define MAX_MOD 1000000007 #define REP(i,n) for(long long i = 0;i < n;++i) int main() { long long n; cin >> n; long long hoge = n; hoge += 2; hoge /= (long long)2; hoge %= 1000007; long long mew = (long long)(n + (long long)3)/2; mew %= 1000007; hoge *= mew; hoge--; hoge += 1000007; hoge %= 1000007; cout << hoge << endl; return 0; }