var
m,n:integer;
a:array[-20..22,-20..22]of longint;
begin
assign(input,'horse.in');assign(output,'horse.out');
reset(input);rewrite(output);
read(m,n);
a[1,1]:=1;
for n:=1 to n do
for m:=1 to m do
begin
a[m+2,n+1]:=a[m+2,n+1]+a[m,n];
a[m-2,n+1]:=a[m-2,n+1]+a[m,n];
a[m+1,n+2]:=a[m+1,n+2]+a[m,n];
a[m-1,n+2]:=a[m-1,n+2]+a[m,n];
end;
writeln(a[m,n]);
close(input);close(output);
end.