#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e3 + 100;
const int mod = 1e9 + 7;
mt19937 rng(chrono::high_resolution_clock::now().time_since_epoch().count());
int n, o = 2e3;
long long dp[maxn][maxn * 2][2];
long long solve(int len, int bal, int can) {
  if (len == 2 * n) return 0;
  long long &ret = dp[len][bal][can];
  if (ret != -1) return ret;
  ret = can;
  int real_bal = bal - o;
  int closed = (len - real_bal) / 2, open = real_bal + closed;
  int done = 0;
  if (open < n) {
    ret = (ret + solve(len + 1, bal + 1, !can)) % mod;
    if (can == 1) done = 1;
  }
  if (real_bal != 0) {
    if (can == 1) {
      if (done == 1)
        ret = (ret + solve(len + 1, bal - 1, 1)) % mod;
      else
        ret = (ret + solve(len + 1, bal - 1, 0)) % mod;
    } else
      ret = (ret + solve(len + 1, bal - 1, 1)) % mod;
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0);
  cin >> n;
  memset(dp, -1, sizeof dp);
  cout << solve(0, o, 1) << "\n";
  return 0;
}
