#include <iostream>
using namespace std;
int main() {
int m, n;
cin >> n >> m;
if (m > n) swap(n, m);
long long den = 1, ways = 1; // den - знаменатель, ways - количество способов.
for (int i = 0; i < m - 1; i++) {
ways *= n + i;
if (ways % den == 0) {
ways /= den;
den++;
}
}
cout << ways;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbSwgbjsKCWNpbiA+PiBuID4+IG07CglpZiAobSA+IG4pIHN3YXAobiwgbSk7Cglsb25nIGxvbmcgZGVuID0gMSwgd2F5cyA9IDE7IC8vIGRlbiAtINC30L3QsNC80LXQvdCw0YLQtdC70YwsIHdheXMgLSDQutC+0LvQuNGH0LXRgdGC0LLQviDRgdC/0L7RgdC+0LHQvtCyLgoJZm9yIChpbnQgaSA9IDA7IGkgPCBtIC0gMTsgaSsrKSB7CgkJd2F5cyAqPSBuICsgaTsKCQlpZiAod2F5cyAlIGRlbiA9PSAwKSB7CgkJCXdheXMgLz0gZGVuOwoJCQlkZW4rKzsKCQl9Cgl9Cgljb3V0IDw8IHdheXM7CglyZXR1cm4gMDsKfQ==