#include #define VARNAME(x) #x #define show(x) cerr << #x << " = " << x << endl using namespace std; using ll = long long; using ld = long double; template vector Vec(int n, T v) { return vector(n, v); } template auto Vec(int n, Args... args) { auto val = Vec(args...); return vector(n, move(val)); } template ostream& operator<<(ostream& os, const vector& v) { os << "sz:" << v.size() << "\n["; for (const auto& p : v) { os << p << ","; } os << "]\n"; return os; } template ostream& operator<<(ostream& os, const pair& p) { os << "(" << p.first << "," << p.second << ")"; return os; } constexpr ll MOD = (ll)1e9 + 7LL; constexpr ld PI = static_cast(3.1415926535898); template constexpr T INF = numeric_limits::max() / 10; class Modulo { public: Modulo(const int n, const ll mod = 1000000007LL) : m_size{n + 1}, m_mod{mod} // mod should be prime { assert(n > 0); m_fact.resize(n + 1); m_inv.resize(n + 1); m_inv_fact.resize(n + 1); m_fact[0] = 1; m_inv[0] = 1; m_inv_fact[0] = 1; m_fact[1] = 1; m_inv[1] = 1; m_inv_fact[1] = 1; for (int i = 2; i <= n; i++) { m_fact[i] = (m_fact[i - 1] * static_cast(i)) % mod; m_inv[i] = ((mod - (mod / static_cast(i))) * m_inv[static_cast(mod) % i]) % mod; m_inv_fact[i] = (m_inv_fact[i - 1] * m_inv[i]) % mod; } } ll factorial(const int n) const { assert(n < m_size); return m_fact[n]; } ll inverse(const int n) const { assert(n < m_size); return m_inv[n]; } ll inverseFactorial(const int n) const { assert(n < m_size); return m_inv_fact[n]; } ll permutation(const int n, const int k) const { assert(n < m_size); assert(k <= n); return (m_fact[n] * m_inv_fact[n - k]) % m_mod; } ll combination(const int n, const int k) const { assert(n < m_size); assert(k <= n); return (((m_fact[n] * m_inv_fact[k]) % m_mod) * m_inv_fact[n - k]) % m_mod; } ll homogenious(const int n, const int k) const { if (n == 0 and k == 0) { return 1; } return combination(n + k - 1, k); } private: const int m_size; const ll m_mod; vector m_fact; vector m_inv; vector m_inv_fact; }; int main() { cin.tie(0); ios::sync_with_stdio(false); ll N; cin >> N; Modulo mod(2 * N + 1); ll sum = 0; for (int i = 1; N + 2 * i <= 2 * N; i++) { const ll num = N + 2 * i; (sum += (mod.combination(num - 1, i - 1) * mod.inverse(i)) % MOD) %= MOD; } (sum *= N) %= MOD; cout << (sum + 1) % MOD << endl; return 0; }