#include <bits/stdc++.h>
using namespace std;
const long long N = 1000 + 5;
const long long M = (long long)1e9 + 7;
long long n, dp[2 * N][N][2];
void init() { cin >> n; }
void solve() {
  for (long long i = 1; i <= 2 * n; ++i) {
    for (long long j = 0; j <= n; ++j) {
      for (long long k = 0; k < 2; ++k) {
        if (i < j) continue;
        dp[i][j][k] = 0;
        if (j > 0)
          dp[i][j][k] =
              (dp[i][j][k] % M + dp[i - 1][j - 1][k ^ 1] % M + (k == 1)) % M;
        dp[i][j][k] =
            (dp[i][j][k] % M + dp[i - 1][j + 1][k ^ 1] % M + (k == 1)) % M;
      }
    }
  }
  cout << dp[2 * n][0][0] % M * 500000004 % M << '\n';
}
int32_t main() {
  init();
  solve();
}
