def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]
N=int(input())

mod=998244353
L=primes(N-1)
R=[0]*N
#コーナーに気をつけて
K=[list() for i in range(N)]
for i in range(len(L)):
  s=L[i]
  for j in range(s,N,s):
    K[j].append(s)
for i in range(1,N):
  a=i
  b=N-i
  if a>b:
    break
  x=dict()
  a2=a
  b2=b
  for j in range(len(K[a])):
    s=K[a][j]
    this=0
    while a2%s==0:
      a2//=s
      this+=1
    if s in x:
      x[s]+=this
    else:
      x[s]=this
  for j in range(len(K[b])):
    s=K[b][j]
    this=0
    while b2%s==0:
      b2//=s
      this+=1
    if s in x:
      x[s]+=this
    else:
      x[s]=this
  for i in x:
    R[i]=max(R[i],x[i])
ans=1
for i in L:
  ans*=pow(i,R[i],mod)
  ans%=mod
print(ans)