#include <iostream>
#define N 30
int main() {
// Создаем треугольную матрицу для хранения всех ответов
long *x[N];
for (int i=0; i < N; ++i) x[i] = new long[i+1];
// Находим все ответы
x[0][0] = 1;
for (int i=1; i < N; ++i) {
x[i][0] = 1;
for (int j=1; j < i; ++j) x[i][j] = x[i-1][j] + x[i][j-1];
x[i][i] = 2 * x[i][i-1];
}
// Проходим все тесты
int m, n;
std::cin >> m >> n;
std::cout << x[std::max(n,m)-1][std::min(n,m)-1];
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojZGVmaW5lIE4gMzAKaW50IG1haW4oKSB7CgkvLyDQodC+0LfQtNCw0LXQvCDRgtGA0LXRg9Cz0L7Qu9GM0L3Rg9GOINC80LDRgtGA0LjRhtGDINC00LvRjyDRhdGA0LDQvdC10L3QuNGPINCy0YHQtdGFINC+0YLQstC10YLQvtCyCglsb25nICp4W05dOwoJZm9yIChpbnQgaT0wOyBpIDwgTjsgKytpKSB4W2ldID0gbmV3IGxvbmdbaSsxXTsKCS8vINCd0LDRhdC+0LTQuNC8INCy0YHQtSDQvtGC0LLQtdGC0YsKCXhbMF1bMF0gPSAxOwoJZm9yIChpbnQgaT0xOyBpIDwgTjsgKytpKSB7CgkJeFtpXVswXSA9IDE7CgkJZm9yIChpbnQgaj0xOyBqIDwgaTsgKytqKSB4W2ldW2pdID0geFtpLTFdW2pdICsgeFtpXVtqLTFdOwoJCXhbaV1baV0gPSAyICogeFtpXVtpLTFdOwkJCgl9CgkvLyDQn9GA0L7RhdC+0LTQuNC8INCy0YHQtSDRgtC10YHRgtGLCglpbnQgbSwgbjsgCglzdGQ6OmNpbiA+PiBtID4+IG47CglzdGQ6OmNvdXQgPDwgeFtzdGQ6Om1heChuLG0pLTFdW3N0ZDo6bWluKG4sbSktMV07Cn0=