#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 2000005;
long long fac[MAXN + 10];
long long inv[MAXN + 10];
long long mod = 1e9 + 7;
long long qpow(long long a, long long k) {
  long long ans = 1;
  while (k) {
    if (k & 1) ans = ans * a % mod;
    a = a * a % mod;
    k >>= 1;
  }
  return ans;
}
void init() {
  fac[0] = 1;
  for (int i = 1; i <= MAXN; i++) fac[i] = fac[i - 1] * i % mod;
  inv[MAXN] = qpow(fac[MAXN], mod - 2);
  for (int i = MAXN - 1; i >= 0; i--) inv[i] = inv[i + 1] * (i + 1) % mod;
}
long long C(long long n, long long m) {
  return fac[n] * inv[n - m] % mod * inv[m] % mod % mod;
}
int main() {
  long long n;
  ios::sync_with_stdio(false);
  init();
  cin >> n;
  long long tmp = qpow(2, n);
  long long ans = (qpow(2, n + 1) - 1 + mod) % mod;
  for (int i = n; i < 2 * n; i++) {
    long long cnt1 = C(i, n) * 2 % mod;
    tmp = (cnt1 % mod + (tmp - cnt1 + mod) % mod * 2 % mod % mod) % mod;
    ans = (tmp + ans) % mod;
  }
  cout << ans;
}
