N=int(input()) mod=998244353 X=[i for i in range(10**6+1)] FACT=[dict() for i in range(10**6+1)] for i in range(2,10**6+1): if X[i]!=1: k=X[i] for j in range(i,10**6+1,i): X[j]//=k if k in FACT[j]: FACT[j][k]+=1 else: FACT[j][k]=1 LCM=[0]*(10**6+1) for j in range(1,N//2+1): D1=FACT[j] D2=FACT[N-j] for s in D1: if s in D1: x1=D1[s] else: x1=0 if s in D2: x2=D2[s] else: x2=0 LCM[s]=max(LCM[s],x1+x2) for s in D2: if s in D1: x1=D1[s] else: x1=0 if s in D2: x2=D2[s] else: x2=0 LCM[s]=max(LCM[s],x1+x2) ANS=1 for i in range(10**6+1): if LCM[i]==0: continue ANS=ANS*pow(i,LCM[i],mod)%mod print(ANS)