#include <iostream>
#include <vector>
using namespace std;
int numTrees(int n) {
vector<long long> dp(n + 1, 0);
dp[0] = 1;
dp[1] = 1;
for(int i = 2; i <= n; i++) {
for(int j = 1; j <= i; j++) {
dp[i] += dp[j-1] * dp[i-j];
}
}
return dp[n];
}
int main() {
int n;
cin >> n;
cout << numTrees(n) << endl;
return 0;
}
import java.util.Scanner;
public class Main {
public static int numTrees(int n) {
long[] dp = new long[n + 1];
dp[0] = 1;
dp[1] = 1;
for(int i = 2; i <= n; i++) {
for(int j = 1; j <= i; j++) {
dp[i] += dp[j-1] * dp[i-j];
}
}
return (int)dp[n];
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
System.out.println(numTrees(n));
sc.close();
}
}
def num_trees(n):
dp = [0] * (n + 1)
dp[0] = dp[1] = 1
for i in range(2, n + 1):
for j in range(1, i + 1):
dp[i] += dp[j-1] * dp[i-j]
return dp[n]
n = int(input())
print(num_trees(n))