def Eratosthenes(N): #N以下の素数のリストを返す N+=1 is_prime_list = [True]*N m = int(N**0.5)+1 for i in range(3,m,2): if is_prime_list[i]: is_prime_list[i*i::2*i]=[False]*((N-i*i-1)//(2*i)+1) return [2] + [i for i in range(3,N,2) if is_prime_list[i]] n = int(input()) primes = Eratosthenes(n-1) MOD = 998244353 r = 1 while primes and primes[-1]**2 >= n: p = primes.pop() if n%p: r = r*p%MOD else: r = r*p*p%MOD for p in primes: v = 0 for i in range(1,(n+1)//2): k = i*(n-i) c = 0 while k%p == 0: k //= p c += 1 if v < c: v = c r = r*pow(p,v,MOD)%MOD print(r)