import sys def input(): return sys.stdin.readline().strip() def mapint(): return list(map(int, input().split())) sys.setrecursionlimit(10**9) N = int(input()) mod = 998244353 def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a from collections import Counter, defaultdict count = [] for i in range(1, N): count.append(Counter(prime_factorize(i))) primes = defaultdict(int) for i in range(N-1): for key in count[i].keys(): primes[key] = max(count[i][key]+count[-i-1][key], primes[key]) for key in count[-i-1].keys(): primes[key] = max(count[i][key]+count[-i-1][key], primes[key]) ans = 1 for key in primes.keys(): ans *= pow(key, primes[key], mod) ans %= mod print(ans)