#include<stdio.h>

int comPu(int n,int m)
{
    if(0 == n || 0 == m)    return 1;
    if(1 == n && 1 == m)    return 2;
    return comPu(n-1, m) + comPu(n, m-1);
}

int main()
{
    int n,m;
    while(EOF !=scanf("%d%d",&n,&m))
    {
        printf("%d\n",comPu(n, m));
    }
    
    return 0;
}