ROOT = 3 MOD = 998244353 roots = [pow(ROOT,(MOD-1)>>i,MOD) for i in range(24)] # 1 の 2^i 乗根 iroots = [pow(x,MOD-2,MOD) for x in roots] # 1 の 2^i 乗根の逆元 def untt(a,n): for i in range(n): m = 1<<(n-i-1) for s in range(1<>= 1 return ans # coding: utf-8 # Your code here! import sys read = sys.stdin.read readline = sys.stdin.readline #n = int(readline()) n, = map(int,readline().split()) #*a, = map(int,readline().split()) def mul_poly(f,g): df,dg = len(f),len(g) res = [0]*(df+dg-1) for i in range(df): for j in range(dg): res[i+j] += f[i]*g[j] res[i+j] %= MOD return res f = [(i+1)*inv[i]%MOD for i in range(n)] f[0] = 1 #print(f) g = pow_poly(f,n,n) #print(g) print(g[n-2]*fac[n-2]%MOD*pow(n,MOD-1-n+2,MOD)%MOD)