import java.util.*;
import java.lang.*;
class Rextester
{
public static int combination(int n,int r){
int res = 1;
if(r > n-r){
r = n-r;
}
for(int k = 0;k<r;k++){
res *= (n-k);
res /= k+1;
}
return res;
}
public static int catalina(int num){
return combination(2*num,num)/(num+1);
}
public static void main(String args[])
{
System.out.println(catalina(8));
}
}
|