n=int(input()) if n<4: print(0) exit() M=998244353 fa=[1,1] fb=[1,1] for i in range(2,n+1): fa+=[fa[-1]*i%M] fb+=[fb[-1]*(M//i)*fb[M%i]*fa[M%i-1]*(-1)%M] g=0 for a in range(2,n-1): b=n-a g+=(fa[n]*(fb[a+b-1]*fa[a+b-1-1])*(fb[a]*fa[a-1])*(fb[b]*fa[b-1])*fb[a-2]*fb[b-2]%M)**2 g%=M print(g)