#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int MAXN = 1000000;
long long n;
long long fac[2 * MAXN + 100];
long long inv[2 * MAXN + 100];
long long nCr(long long n, long long r) {
  return fac[n] * inv[r] % MOD * inv[n - r] % MOD;
}
long long binpow(long long a, long long n) {
  long long res = 1;
  while (n) {
    if (n & 1) res = res * a % MOD;
    a = a * a % MOD;
    n >>= 1;
  }
  return res;
}
int main() {
  cin >> n;
  fac[0] = inv[0] = inv[1] = 1;
  for (int i = 1; i <= 2 * MAXN; i++) fac[i] = fac[i - 1] * i % MOD;
  for (int i = 2; i <= 2 * MAXN; i++)
    inv[i] = (MOD - MOD / i) * inv[MOD % i] % MOD;
  for (int i = 1; i <= 2 * MAXN; i++) inv[i] = inv[i - 1] * inv[i] % MOD;
  long long A = binpow(2, 2 * n + 1) - 1;
  long long B = 0;
  for (long long x = 1; x <= n; ++x) {
    long long foo =
        binpow(2, x + 1) * nCr(2 * n - x - 1, n - 1) % MOD * 2 % MOD;
    B = (B + foo) % MOD;
  }
  long long C = 0;
  for (long long x = 1; x <= n; ++x) {
    long long foo = (x + 2) * nCr(2 * n - x - 1, n - 1) % MOD * 2 % MOD;
    C = (C + foo) % MOD;
  }
  long long ans;
  ans = (A - B + C) % MOD;
  while (ans < 0) ans += MOD;
  cout << ans;
  return 0;
}
