package yukicoder; import java.util.Scanner; public class Main { public static void main(String[] args) { new Main().solver(); } final long MOD = 1000000007; void solver() { Scanner sc = new Scanner(System.in); int N = sc.nextInt(); if (N == 1 || N == 2) { System.out.println(0); return; } long[] c = new long[N + 2]; c[0] = 1; c[1] = 2; c[2] = 1; long inv_4=250000002; long[] dp = new long[N + 1];// dp[i]:N=iの時の門松列の数 dp[0] = 2; dp[1] = 2; dp[2] = 2; for (int i = 2; i < N; i++) { for (int j = 0; j <= i; j++) { dp[i + 1] += dp[j] * dp[i - j] % MOD * c[j] % MOD*inv_4; dp[i + 1] %= MOD; if (dp[i + 1] < 0 || c[j] <= 0) { throw new AssertionError("error"); } } for (int j = i + 1; j >= 0; j--) { if (j != 0) { c[j] = c[j] + c[j - 1]; } else { c[j] = 1; } c[j] %= MOD; if (c[j] < 0) throw new AssertionError(); } } System.out.println(dp[N]); sc.close(); } }