from collections import defaultdict N = int(input()) mod = 998244353 def smallest_prime_factors(n): """各数の最小素因数を求める""" spf = [0]*(n+1) for i in range(n+1): spf[i] = i for i in range(2,n+1): if i*i>n: break if spf[i] == i: for j in range(i*i, n+1, i): if spf[j] == j: spf[j] = i return spf def fac(x, spf, ret) -> list: while x!=1: if spf[x] in ret: ret[spf[x]] += 1 else: ret[spf[x]] = 1 x //= spf[x] return ret res = [0]*N spf = smallest_prime_factors(N-1) for i in range(N//2): ret = {} a, b = i+1, N-i-1 ret = fac(a, spf, ret) ret = fac(b, spf, ret) for key in ret.keys(): res[key] = max(ret[key], res[key]) ans = 1 for i in range(N): if res[i] != 0: ans *= pow(i, res[i], mod) ans %= mod print(ans)