from collections import Counter, defaultdict N = int(input()) MOD = 998244353 table = [None] * (N + 1) for i in range(2, N + 1): if table[i] is None: for j in range(i, N + 1, i): if table[j] is None: table[j] = i def calc_factors(x): while x != 1: t = table[x] yield t x //= t lcm_dict = defaultdict(int) for x in range(1, N): y = N - x ct = Counter(calc_factors(x)) + Counter(calc_factors(y)) for k, v in ct.items(): lcm_dict[k] = max(lcm_dict[k], v) ans = 1 for k, v in lcm_dict.items(): ans *= pow(k, v, MOD) ans %= MOD print(ans)