def II() -> int : return int(input()) def MI() -> int : return map(int, input().split()) def TI() -> tuple[int] : return tuple(MI()) def LI() -> list[int] : return list(MI()) 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 n = II() mod = 998244353 ans = 0 for d in range(1,n+1): #答えがdになるもの for j in range(1,n+1): if j*d > n: break ans += d*(max(0,min(n,j*(d+1)-1) - j*d) + 1) % mod print(ans%mod)