program xmz;
var
f:array[0..200,0..200]of longint;
n,k,a,b:longint;
f1,f2:text;
function md(x:longint):longint;
begin
if x mod 2=0 then md:=x-1 else md:=x;
end;
begin
assign(f1,'empire.in');assign(f2,'empire.out');
reset(f1);rewrite(f2);
read(f1,n,k);
if k>2*n-2 then write(f2,0)
else if k=0 then write(f2,1)
else
begin
for a:=1 to 2*n-1 do
begin
if a mod 2=0 then f[a,1]:=(trunc(a/2*a)) mod 504;
if a mod 2<>0 then f[a,1]:=(trunc(((a-1)/2)*(a-1)+a)) mod 504;
end;
for a:=1 to 2*n-1 do
for b:=2 to k do
if a>b then f[a,b]:=(f[a-1,b]+(f[a-1,b-1]*(md(a)-b+1)mod 504)) mod 504;
write(f2,f[2*n-1,k] mod 504);
end;
close(f1);close(f2);
end.