def min(a,b); a < b ? a : b; end N = gets.to_i dp = Array.new(N + 1){Array.new(N + 1, 0)} dp[0][0] = 1 (1 .. 2 * N).each do |n| (0 .. min(n, N)).each do |l| r = n - l if r > l dp[l][r] = 0 else dp[l][r] = dp[l - 1][r] + dp[l][r - 1] end end end puts dp[N][N]