import sys input = sys.stdin.readline mod=998244353 N=int(input()) ANS=0 for i in range(1,N+1): now=1 while now<=i: k=i//now nec=i//k+1 ANS=(ANS+k*(nec-now))%mod now=nec print(ANS)