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=dict() for j in range(1,N//2+1): D1=FACT[j] D2=FACT[N-j] for s in set(D1.keys())|set(D2.keys()): if s in D1: x1=D1[s] else: x1=0 if s in D2: x2=D2[s] else: x2=0 if s in LCM: LCM[s]=max(LCM[s],x1+x2) else: LCM[s]=x1+x2 #print(LCM) ANS=1 for s in LCM: ANS=ANS*pow(s,LCM[s],mod)%mod print(ANS)