#include <iostream>
using namespace std;
int getAns(int m,int n){
if(m == 1 || n == 1) return m + n;
return getAns(m-1,n) + getAns(m,n-1);
}
int main(){
int m,n;
while(cin>>m>>n){
cout<<getAns(m,n)<<endl;
}
return 0;
}