#include using namespace std; const long mod=998244353; int N; long FAC,ALL[2<<17],TWO[2<<17]; main() { cin>>N; FAC=1; for(int i=1;i<=N;i++)FAC=FAC*i%mod; ALL[1]=0; ALL[2]=1; for(int i=3;i<=N;i++)ALL[i]=(i-1)*(ALL[i-1]+ALL[i-2])%mod; TWO[0]=1; for(int i=3;i<=N;i++) { if(i%2==1)TWO[i]=((i-1)*TWO[i-1]+2*(i-1)*TWO[i-2])%mod; else TWO[i]=((i-1)*TWO[i-1]+2*(i-2)*TWO[i-4])%mod; } cout<<((FAC-2*ALL[N]+TWO[N])%mod+mod)%mod<