import java.util.*;
import java.lang.*;
import java.io.*;
class Main
{
{
Scanner in
= new Scanner
(System.
in); int m = in.nextInt();
int n = in.nextInt();
long[][] a = new long[m][n];
a[m-1][0] = 1;
for(int i = m-1; i >= 0; i--) {
for(int j = 0; j < n; j++) {
if(i == m-1 && j == 0) continue;
a[i][j] = (i < m-1 ? a[i+1][j] : 0) + (j > 0 ? a[i][j-1] : 0);
}
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBNYWluCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB0aHJvd3MgamF2YS5sYW5nLkV4Y2VwdGlvbgoJewoJCVNjYW5uZXIgaW4gPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwogICAgICAgIGludCBtID0gaW4ubmV4dEludCgpOwogICAgICAgIGludCBuID0gaW4ubmV4dEludCgpOwogICAgICAgIGxvbmdbXVtdIGEgPSBuZXcgbG9uZ1ttXVtuXTsKICAgICAgICBhW20tMV1bMF0gPSAxOwogICAgICAgIGZvcihpbnQgaSA9IG0tMTsgaSA+PSAwOyBpLS0pIHsKICAgICAgICAgICAgZm9yKGludCBqID0gMDsgaiA8IG47IGorKykgewogICAgICAgICAgICAgICAgaWYoaSA9PSBtLTEgJiYgaiA9PSAwKSBjb250aW51ZTsKICAgICAgICAgICAgICAgIGFbaV1bal0gPSAoaSA8IG0tMSA/IGFbaSsxXVtqXSA6IDApICsgKGogPiAwID8gYVtpXVtqLTFdIDogMCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgU3lzdGVtLm91dC5wcmludChhWzBdW24tMV0pOwoJfQp9