#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007LL;
const int ss = 1000005;
long long levels[2 * ss];
long long pow2[2 * ss];
long long fac[2 * ss];
long long inv_fac[2 * ss];
long long invers(int i) {
  long long res = 1;
  long long c = mod - 2;
  long long prod = fac[i];
  while (c > 0) {
    if (c % 2 == 1) res = (res * prod) % mod;
    prod = (prod * prod) % mod;
    c = c / 2;
  }
  return res;
}
int n;
long long C(long long a, long long b) {
  if (inv_fac[b] == 0) inv_fac[b] = invers(b);
  if (inv_fac[a - b] == 0) inv_fac[a - b] = invers(a - b);
  return (((fac[a] * inv_fac[b]) % mod) * inv_fac[a - b]) % mod;
}
long long not_replicate[2 * ss];
int main() {
  pow2[0] = 1;
  fac[0] = 1;
  inv_fac[0] = 1;
  cin >> n;
  for (int i = 1; i < 2 * ss; i++) {
    pow2[i] = (pow2[i - 1] * 2LL) % mod;
    fac[i] = (fac[i - 1] * i) % mod;
  }
  for (int i = 0; i <= n; i++) {
    levels[i] = pow2[i];
  }
  levels[n + 1] = pow2[n + 1] - 2;
  not_replicate[0] = 2;
  long long last = 1LL;
  for (int i = n + 2, j = 1; i <= 2 * n; i++, j++) {
    long long c = 1, d = 0;
    long long temp = C(i - 1, j);
    long long dd = (2LL * (temp - last)) % mod;
    last = temp;
    not_replicate[j] = (not_replicate[j - 1] + dd) % mod;
    levels[i] =
        (2LL * (levels[i - 1] - not_replicate[j]) + not_replicate[j] + mod) %
        mod;
  }
  long long sum = 0LL;
  for (int i = 0; i <= 2 * n; i++) {
    sum = (sum + levels[i]) % mod;
  }
  cout << sum << endl;
}
