#include <bits/stdc++.h>
using namespace std;
const long long int mx = 1e9 + 7LL;
const int mxn = 2 * (1e6 + 7);
long long int silnie[mxn], silnia[mxn];
long long int szybkie(long long int a, long long int b) {
  if (b == 0) return 1LL;
  long long int x = szybkie(a, b / 2LL);
  if (b % 2 == 0LL) return (x * x) % mx;
  return (((x * x) % mx) * a) % mx;
}
long long int RevMod(long long int a) {
  a = szybkie(a, mx - 2LL);
  return a;
}
int main() {
  long long int n;
  cin >> n;
  long long int result = (szybkie(2LL, 2LL * n + 1LL) - 1LL) % mx;
  silnie[0] = 1LL;
  for (int i = 1; i <= 2 * n; ++i)
    silnie[i] = (silnie[i - 1] * (long long int)i) % mx;
  silnia[0] = 1LL;
  for (int i = 1; i <= n; ++i)
    silnia[i] =
        (((silnia[i - 1] * (n + (long long int)i)) % mx) * RevMod(i)) % mx;
  for (int i = 0; i <= n; ++i) {
    long long int k = n - (long long int)i;
    result -= ((szybkie(2LL, k) - 1) * 2LL * silnia[i]) % mx;
    result %= mx;
  }
  result += mx;
  result %= mx;
  cout << result;
  return 0;
}
