#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long n;
long long fac[2000005];
long long inv[2000005];
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;
}
long long C(long long n, long long m) {
  return fac[n] * inv[n - m] % mod * inv[m] % mod;
}
void init() {
  fac[1] = 1;
  for (int i = 2; i <= 2 * n; i++) fac[i] = fac[i - 1] * i % mod;
  inv[2 * n] = qpow(fac[2 * n], mod - 2);
  for (int i = 2 * n - 1; i >= 0; i--) inv[i] = inv[i + 1] * (i + 1) % mod;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  init();
  long long sum = qpow(2, n);
  long long ans = 0;
  for (int i = n; i < 2 * n; i++) {
    long long cnt1 = C(i, n) * 2 % mod;
    long long cnt2 = (sum - cnt1 + mod) % mod;
    sum = (cnt1 + cnt2 * 2 % mod) % mod;
    ans = (ans + sum) % mod;
  }
  for (int i = 0; i <= n; i++) ans = (ans + qpow(2, i)) % mod;
  cout << ans;
}
