import math n=int(input()) res=n-1 for i in range(n-1): res = ((i+1)*(n-(i+1))*res)//math.gcd((i+1)*(n-(i+1)),res) print(res%998244353)