#include <iostream>
using namespace std;

int GetNum(int raw, int col)
{
    if(raw == 1 || col == 1)
    {
        return raw+col;
    }
    else
    {
        return GetNum(raw-1,  col) + GetNum(raw, col-1);
    }
}

int main()
{
    int raw,col;

    while(cin>>raw>>col)
    {
        cout<<GetNum(raw, col)<<endl;
    }

    return 0;
}