public class myClass public static void main String args throws IOExce

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
public class myClass {
public static void main(String[] args) throws IOException {
Scanner in = new Scanner (System.in);
PrintWriter out = new PrintWriter(System.out);
//PrintWriter out = new PrintWriter(new File("output.txt"));
//Scanner in = new Scanner (new File("input.txt"));
int n, m;
n = in.nextInt();
m = in.nextInt();
BigInteger []f = new BigInteger[60];
f[0] = BigInteger.ONE;
for (int i = 1; i < n + m; ++i) {
f[i] = f[i - 1].multiply(BigInteger.valueOf(i));
}
BigInteger answer = f[n + m - 1].divide(f[m - 1].multiply(f[n]));
out.print(answer);
out.close();
}
}