Program put(input,output);
Const
maxn=100000;
Var
n,i,j:longint;
a:array[1..maxn]of longint;
Begin
assign(input,'put.in');
assign(output,'put.out');
reset(input);
rewrite(output);
readln(n);
a[1]:=0;
a[2]:=1;
for i:=3 to n do
begin
a[i]:=(a[i-1]+a[i-2])*(i-1);
a[i]:=a[i]mod 1206;
end;
if n=1 then writeln('No Solution!')
else writeln(a[n]);
close(input);
close(output);
End.