#include <stdio.h>
#include <string.h>
int f(int n, int m);
int main()
{
int m, n;
while (scanf("%d %d", &n, &m) != EOF)
{
int pathcount = f(n, m);
printf("%d\n", pathcount);
}
return 0;
}
int f(int n, int m)
{
int ret;
if (n == 0 || m == 0)
ret = 1;
else
{
ret = f(n, m - 1) + f(n - 1, m);
}
return ret;
}