def primes(n): ps = [2] t = [True] * (n + 1) for i in range(3, n+1, 2): if t[i]: ps.append(i) for j in range(i+i, n+1, i): t[j] = False return ps MOD = 998244353 N = int(input()) ps = primes(N) ps.pop() ans = 1 for p in ps: x = p while x*p <= N: x *= p x %= MOD ans *= x ans %= MOD print(ans)