#include <bits/stdc++.h>
using namespace std;
long long t, n, m, u, v, q, r, ql, qr, k, l, s, w, h, c, z, d, y, x, a;
const int N = 2e6 + 500;
const long long mod = 1e9 + 7;
const long long INF = 1LL << 52LL;
const bool JUDGE = false;
long long cnt[N], pd[N];
long long fact[N], ifact[N], inv[N];
void _pre() {
  fact[1] = fact[0] = 1;
  ifact[0] = ifact[1] = 1;
  inv[0] = inv[1] = 1;
  for (int i = 1; i < N; ++i) fact[i] = (fact[i - 1] * i) % mod;
  for (int i = 2; i < N; ++i)
    inv[i] = (((-(mod / i) * inv[mod % i]) % mod) + mod) % mod;
  for (int i = 2; i < N; ++i) ifact[i] = (ifact[i - 1] * inv[i]) % mod;
}
long long C(int n, int k) {
  if (k > n) return 0;
  if (n < 0 || k < 0) return 0;
  return (fact[n] * ((ifact[n - k] * ifact[k]) % mod)) % mod;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  if (JUDGE) {
    freopen("angry.in", "r", stdin);
    freopen("angry.out", "w", stdout);
  }
  _pre();
  cin >> n;
  long long x = 1;
  long long sol = 1;
  for (int i = 1; i <= n; ++i) {
    x += x;
    if (x >= mod) x -= mod;
    sol += x;
    if (sol >= mod) sol -= mod;
  }
  cnt[0] = x;
  pd[0] = 2 * C(n, n);
  if (pd[0] >= mod) pd[0] -= mod;
  for (int i = 1; i <= n; ++i) {
    cnt[i] = pd[i - 1] + (cnt[i - 1] - pd[i - 1]) * 2;
    cnt[i] %= mod;
    if (cnt[i] < 0) cnt[i] += mod;
    pd[i] = 2 * C(i + n, n);
    if (pd[i] >= mod) pd[i] %= mod;
    sol += cnt[i];
    if (sol >= mod) sol %= mod;
  }
  cout << sol << '\n';
  return 0;
}
