def II(): return int(input()) def MI(): return map(int, input().split()) def TI(): return tuple(MI()) def LI(): return list(MI()) #str-input def SI(): return input() def MSI(): return input().split() def SI_L(): return list(SI()) def SI_LI(): return list(map(int, SI())) #multiple-input def LLI(n): return [LI() for _ in range(n)] def LSI(n): return [SI() for _ in range(n)] #1-indexを0-indexでinput def MI_1(): return map(lambda x:int(x)-1, input().split()) def TI_1(): return tuple(MI_1()) def LI_1(): return list(MI_1()) class fenwick_tree(): n=1 data=[0 for i in range(n)] def __init__(self,N): self.n=N self.data=[0 for i in range(N)] def add(self,p,x): assert 0<=p0): s+=self.data[r-1] r-=r&-r return s mod = 998244353 class Comb: #combination列挙 def __init__(self,lim,mod = mod): """ mod : prime指定 lim以下のmodでcomdination計算 """ self.fac = [1,1] self.inv = [1,1] self.finv = [1,1] self.mod = mod for i in range(2,lim+1): self.fac.append(self.fac[i-1]*i%self.mod) self.inv.append(-self.inv[mod%i]*(mod//i)%self.mod) self.finv.append(self.finv[i-1]*self.inv[i]%self.mod) def F(self,a): return self.fac[a] def C(self,a,b): #自然な拡張 assert b >= 0, "第2引数の値が負です" if a < b: return 0 if a < 0: return 0 # 0 <= a ∧ b <= a (b < 0でバグる) return self.fac[a]*self.finv[b]*self.finv[a-b]%self.mod def P(self,a,b): assert b >= 0, "第2引数の値が負です" if a < b: return 0 if a < 0: return 0 return self.fac[a]*self.finv[a-b]%self.mod def H(self,a,b): return self.C(a+b-1,b) def Fi(self,a): return self.finv[a] n = II() comb = Comb(n+1) #縦の長さ ans = 0 for i in range(2,n-1): j = n-i #最長減少 di = pow(i,-1,mod) dj = pow(j,-1,mod) dij = pow(i+j-1,-1,mod) ans += (comb.F(n)*comb.Fi(i-2)*comb.Fi(j-2)%mod*di*dj*dij%mod)**2 print(ans%mod)