import sys INF = float('inf') MOD = 10**9 + 7 MOD2 = 998244353 def solve(): def II(): return int(sys.stdin.readline()) def LI(): return list(map(int, sys.stdin.readline().split())) def LC(): return list(input()) def IC(): return [int(c) for c in input()] def MI(): return map(int, sys.stdin.readline().split()) N = II() MAX = 1000010 Prime = [True for i in range(MAX)] Prime[0] = False Prime[1] = False Product = [] for i in range(2, N): if (Prime[i]): for j in range(2 * i, N, i): Prime[j] = False Tmp = i while(Tmp <= N-1): Tmp *=i Tmp = Tmp//i Tmp2 = N - Tmp More = 1 while(Tmp2%i == 0 and Tmp2 > 0): Tmp2 = Tmp2//i More *= i Product.append(Tmp*More) #print(Product) Ans = 1 for p in Product: Ans *= p Ans %= MOD2 print(Ans % MOD2) return solve()