1. 
package acm_10303_how_many_trees;

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

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


public class Main
{
static Scanner sc = new Scanner(System.in);
static BigInteger[] fak = new BigInteger[2001];

public static void main(String... args)
{
fak[0] = BigInteger.ONE;
fak[1] = BigInteger.ONE;

for (int i = 2; i < fak.length; i++)
{
fak[i] = fak[i-1].multiply(BigInteger.valueOf(i));
}

while (testcase())
;
}

public static boolean testcase()
{
if (!sc.hasNextInt())
return false;

int n = sc.nextInt();

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

return true;
}

static BigInteger trees (int n)
{
return fak[2*n].divide(fak[n+1].multiply(fak[n]));
}

}