n = int(input()) mod = 998244353 count = [0]*(n+1) primes = [] for i in range(2,n+1): if count[i]: continue primes.append(i) for j in range(i,n+1,i): count[j] = 1 ans = 1 for p in primes[:len(primes)-1]: now = p while now <= n: ans *= p ans %= mod now *= p print(ans)