1. 
package acm_10007_count_the_trees;

import java.math.BigInteger;
import java.util.Scanner;

/**
* FWP, Ausgew¦hlte Probleme aus dem ACM Programming Contest, SS10
* Problem: acm_10007_count_the_trees
* Link:
*
* @author Martin Lambeck
* @version 1.0, 18.08.2010
*
* Method : catalan numbers
* Status : Accepted
* Runtime: 0.620
*/


public class Main
{
static Scanner sc = new Scanner(System.in);

public static void main(String... args)
{
while (testcase())
;
}

public static boolean testcase()
{
int n = sc.nextInt();

if (n == 0)
return false;


System.out.println(trees(n));

return true;
}

static BigInteger trees (int n)
{
int nl = 2*n;
int nf = n+2;

BigInteger bn = BigInteger.ONE;


for (int i = nf; i <= nl; i++)
{
bn = bn.multiply(BigInteger.valueOf(i));
}

return bn;
}

}