from math import lcm mod=998244353 N=int(input()) a=1 for i in range(1,N): a=lcm(a,(N-i)*i) print(a%mod)