import java.util.Scanner;
// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
//1≤n,m≤8 得出的结果可能比较大。用long型。
int n = sc.nextInt();//n为横向的格子数 列
int m = sc.nextInt();//m为竖向的格子数 行
long[][] count = new long[m+1][n+1];
for (int i = 0; i <= n; i++) {
count[0][i] = 1;//列
}
for (int i = 0; i <= m; i++) {
count[i][0] = 1;//行
}
for (int i = 1; i <= m; i++) {//(m,n)
for (int j = 1; j <= n; j++) {
count[i][j] = count[i][j-1] + count[i-1][j];
}
}
System.out.println(count[m][n]);
}
}
/*
0 1 1 1 1 1
1 2 3 4 5 6
1 3 6 10 15 21
1 4 10 20 35 56
1 5 15 65 100 156
*/