ll n;{mint a,b,c;a=b=1;c=0;rd(n);rep(i,n-1)i%2?c+=a=b*i:(b+=a=c*i);wt(a);}