class Main
{
{
java.
util.
Scanner i
= new java.
util.
Scanner(System.
in); int n = i.nextInt();
int m = i.nextInt();
if (m > n){
int t = n;
n = m;
m = t;
}
long den = 1, ways = 1; // den - знаменатель, ways - количество способов.
for (int j = 0; j < m - 1; j++) {
ways *= n + j;
if (ways % den == 0) {
ways /= den;
den++;
}
}
}
}
Y2xhc3MgTWFpbgp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQlqYXZhLnV0aWwuU2Nhbm5lciBpID0gbmV3IGphdmEudXRpbC5TY2FubmVyKFN5c3RlbS5pbik7CgkJaW50IG4gPSBpLm5leHRJbnQoKTsKCQlpbnQgbSA9IGkubmV4dEludCgpOwoJICAgIGlmIChtID4gbil7CgkgICAgCWludCB0ID0gbjsKCSAgICAJbiA9IG07CgkgICAgCW0gPSB0OwoJICAgIH0KCSAgICBsb25nIGRlbiA9IDEsIHdheXMgPSAxOyAvLyBkZW4gLSDQt9C90LDQvNC10L3QsNGC0LXQu9GMLCB3YXlzIC0g0LrQvtC70LjRh9C10YHRgtCy0L4g0YHQv9C+0YHQvtCx0L7Qsi4KCSAgICBmb3IgKGludCBqID0gMDsgaiA8IG0gLSAxOyBqKyspIHsKCSAgICAgICAgd2F5cyAqPSBuICsgajsKCSAgICAgICAgaWYgKHdheXMgJSBkZW4gPT0gMCkgewoJICAgICAgICAgICAgd2F5cyAvPSBkZW47CgkgICAgICAgICAgICBkZW4rKzsKCSAgICAgICAgfQoJICAgIH0KCSAgICBTeXN0ZW0ub3V0LnByaW50bG4od2F5cyk7Cgl9Cn0=