//振兴中华
/******
减而治之
1.定义问题,考虑几个参数
f(x,y)表示从(x,Y)条跳到右下角的方案数
2.找相似性(试探),确定递推关系式
有2中策略向右(x - 1,y)和向下(x,y - 1)
f(x,y) = f(x - 1,y) + f(x,y - 1)
3.确定递归出口(特殊情况)
f(1,y) = 1 f(x,1) = 1
******/
#include<bits/stdc++.h>
using namespace std;
int f(int x,int y);
int main(){
int x,y;
while(cin>>x>>y){
cout<<f(x,y)<<endl;
}
return 0;
}
int f(int x,int y){
if(x==1 || y==1)
return 1;
else
return f(x-1,y) + f(x,y-1);
}