program cogs49;
var
map:array[-1..22,-1..22]of longint;
dx:array[1..4]of byte;
dy:array[1..4]of integer;
i,j,x,y,p:longint;
begin
assign(input,'horse.in');reset(input);
assign(output,'horse.out');rewrite(output);
readln(y,x);
dx[1]:=1;dy[1]:=2;dx[2]:=2;dy[2]:=1;
dx[3]:=1;dy[3]:=-2;dx[4]:=2;dy[4]:=-1;
fillchar(map,sizeof(map),0);
map[2,3]:=1;map[3,2]:=1;
for i:=1 to x do
for j:=1 to y do begin
if map[i,j]=0 then continue;
for p:=1 to 4 do
if (i+dx[p]>x)or(j+dy[p]>y)or(j+dy[p]<0) then continue
else map[i+dx[p],j+dy[p]]:=map[i+dx[p],j+dy[p]]+map[i,j]; end;
writeln(map[x,y]);
close(input);close(output);
end.