import sys input = sys.stdin.readline N=int(input()) mod=998244353 P=[i for i in range(N+1)] for i in range(2,N+1): if P[i]!=1: for j in range(i+i,N+1,i): P[j]//=P[i] #print(P) MAX=max(P) ANS=pow(MAX,mod-2,mod) for i in range(1,N+1): ANS=ANS*P[i]%mod print(ANS)