program cch(input,output);
var
i,n,p,j:integer;
f:array[0..500,-1..300] of longint;
begin
assign(input,'subway.in');
assign(output,'subway.out');
reset(input);
rewrite(output);
readln(n,p);
f[n,0]:=1;
for i:=1 to p do f[n,i]:=0;
for i:=0 to n do f[i,p+1]:=0;
for i:=0 to n do f[i,-1]:=0;
for i:=n-1 downto 0 do
for j:=p downto 0 do
f[i,j]:=(f[i+1,j-1]+f[i,j+1]) mod 4096;
write(f[0,0]);
close(input);
close(output);
end.