MOD = 998244353 n = int(input()) isprime = [True] * n div = {} for i in range(2, n): if not isprime[i]: continue max_ = 1 for j in range(i * i, n, i): isprime[j] = False cnt = 0 while j % i == 0: j //= i cnt += 1 max_ = max(max_, cnt) if n % i == 0: m = n - i ** max_ while m % i == 0: max_ += 1 m //= i div[i] = max_ ans = 1 for k, v in div.items(): for _ in range(v): ans *= k ans %= MOD print(ans % MOD)