var
n,m:longint;
a:array[-2..22,-2..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[n+1,m+2]:=a[n+1,m+2]+a[n,m];
a[n+1,m-2]:=a[n+1,m-2]+a[n,m];
a[n+2,m+1]:=a[n+2,m+1]+a[n,m];
a[n+2,m-1]:=a[n+2,m-1]+a[n,m];
end;
writeln(a[n,m]);
close(input);close(output);
end.