动态规划
#include <iostream>
using namespace std;
typedef long long LL;
const int N = 1010, MOD = 1e9 + 7;
int n;
int f[N];
int main()
{
cin >> n;
f[0] = 1;
for (int i = 1; i <= n; i ++ )
for (int j = 0; j < i; j ++ )
f[i] = (f[i] + (LL)f[j] * f[i - 1 - j]) % MOD;
cout << f[n] << endl;
return 0;
}