import sys from collections import defaultdict sys.setrecursionlimit(10 ** 7) input = sys.stdin.readline f_inf = float('inf') mod = 998244353 class Eratosthenes: def __init__(self, n): self.n = n self.min_factor = [-1] * (n + 1) self.min_factor[0], self.min_factor[1] = 0, 1 self.primes = [] self.get_primes() def get_primes(self): is_prime = [True] * (self.n + 1) is_prime[0] = is_prime[1] = False for i in range(2, self.n + 1): if not is_prime[i]: continue self.primes.append(i) self.min_factor[i] = i for j in range(i * 2, self.n + 1, i): is_prime[j] = False if self.min_factor[j] == -1: self.min_factor[j] = i def return_primes(self): return self.primes def prime_factorization(self, n): res = [] while n != 1: prime = self.min_factor[n] exp = 0 while self.min_factor[n] == prime: exp += 1 n //= prime res.append((prime, exp)) return res def resolve(): n = int(input()) er = Eratosthenes(n) tr = er.primes[-1] pf = defaultdict(int) for i in range(1, n + 1): if i == tr: continue for p, ex in er.prime_factorization(i): pf[p] = max(pf[p], ex) res = 1 for k, v in pf.items(): res *= pow(k, v, mod) res %= mod print(res) if __name__ == '__main__': resolve()