{
haoi2009 moni2 empire
time:2009.4.23
DP
}
program cch(input,output);
var
n,m,ans:longint;
f:array[0..200,0..200] of longint;
procedure init;
begin
assign(input,'empire.in');
assign(output,'empire.out');
reset(input);
rewrite(output);
readln(n,m);
end;
procedure main;
var
i,j,k:longint;
begin
for i:=0 to 2*n-1 do f[i,0]:=1;
for i:=1 to 2*n-1 do f[i,1]:=1;
for i:=1 to 2*n-1 do
for j:=1 to m do
begin
f[i,j]:=0;
for k:=1 to i-j do
begin
f[i,j]:=(f[i,j]+f[i-k,j-1]*(i-j+1)) mod 504;
end;
end;
ans:=f[2*n-1,m];
end;
procedure print;
begin
writeln(ans);
close(input);
close(output);
end;
begin
init;
if n>=2*n-1 then ans:=0
else main;
print;
end.