while(line = readline()) {
const arr = line.split(' ').map(item => parseInt(item));
const [n, m] = arr;
//这里很坑,fill的参数千万不能直接给array,引用类型修改会影响全部元素
let table = Array(m + 1).fill(0).map(x => Array(n + 1).fill(1));
for (let i = 1; i <= n; i++) {
for(let j=1; j<= m; j++) {
table[j][i] = table[j - 1][i] + table[j][i-1];
}
}
print(table[m][n]);
}