mod = 10 ** 9 + 7 def setup(n): fact = [0] * n revFact = [0] * n fact[0] = 1 for i in range(1, n): fact[i] = fact[i - 1] * i % mod revFact[n - 1] = pow(fact[n - 1], mod - 2, mod) for i in range(n - 2, -1, -1): revFact[i] = revFact[i + 1] * (i + 1) % mod return fact, revFact def solve(n): fact, revFact = setup(n * 2 + 1) def P(n, r): return fact[n] * revFact[n - r] % mod if n >= r else 0 def C(n, r): return P(n, r) * revFact[r] % mod def catalan(n): return (C(2 * n, n) - C(2 * n, n + 1) + mod) % mod ans = 0 m = n for i in range(m+1): ans += C(n + 2 * i, i) ans %= mod csum = 0 for i in range(1, m + 1): j = m - i csum += catalan(i - 1) csum %= mod ans += mod - C(n + 2 * j, j) * csum * 2 % mod return ans % mod n = int(input()) print(solve(n))