#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
int ma[150][150];
int m,n;
int solve(int i,int j){
if(i<1||j<1||i>m||j>n) return 0;
if(i==1&&j==1) return 1;
if(ma[i][j]>0) return ma[i][j];
ma[i][j]=solve(i-2,j-1)+solve(i+2,j-1)+solve(i-1,j-2)+solve(i+1,j-2);
return ma[i][j];
}
int main(){
freopen("horse.in","r",stdin);
freopen("horse.out","w",stdout);
int i,j;
scanf("%d%d",&m,&n);
printf("%d",solve(m,n));
return 0;
}