Program cog1340;
Var
N,M,I,J:Longint;
A:Array[0..3000]Of Longint;
Procedure Mul; Inline;
Begin
A[1]:=A[1]*I;
For J:=2 To A[0] Do
Begin
A[J]:=A[J]*I;
If A[J-1]>=10000 Then
Begin
Inc(A[J],A[J-1] Div 10000);
A[J-1]:=A[J-1] Mod 10000;
End;
End;
While A[A[0]]>=10000 Do
Begin
Inc(A[0]);
A[A[0]]:=A[A[0]-1] Div 10000;
A[A[0]-1]:=A[A[0]-1] Mod 10000;
End;
End;
Begin
Assign(Input,'bzoj_2729.in');
Assign(Output,'bzoj_2729.out');
Reset(Input);
Rewrite(Output);
Readln(N,M);
If M>N+3 Then
Begin
Writeln('0');
Close(Input);
Close(Output);
Halt;
End;
A[0]:=1;
A[1]:=(N+2)*(N+3)-2*(N-M+3);
For I:=2 To N+1 Do Mul;
For I:=N-M+4 To N+2 Do Mul;
Write(A[A[0]]);
For I:=A[0]-1 Downto 1 Do
Begin
If A[I]<1000 Then Write('0');
If A[I]<100 Then Write('0');
If A[I]<10 Then Write('0');
Write(A[I]);
End;
Writeln;
Close(Input);
Close(Output);
End.