#include<bits/stdc++.h>
using namespace std;
int n,m;
int ans=0;
int a[31][31];
int xx[2]={1,0};
int yy[2]={0,1};
void mag()
{
a[1][1]=1;
for(int i=1;i<=30;i++){
for(int j=1;j<=30;j++){
if(i%2==0&&j%2==0){
a[i][j]=2;
}
}
}
return ;
}
int ngm(int x,int y){
if(x==n&&y==m){
ans++;
}
for(int i=0;i<2;i++){
int tx=x+xx[i];
int ty=y+yy[i];
if(tx>n||ty>m||tx<1||ty<1||a[tx][ty]!=0) continue;
a[tx][ty]=1;
ngm(tx,ty);
a[tx][ty]=0;
}
return ans;
}
main()
{
ios::sync_with_stdio(0),cin.tie(NULL),cout.tie(NULL);
cin>>n>>m;
mag();
cout<<ngm(1,1);
return 0;
}