n = int(input()) mod = 998244353 prime = [0]*(n+1) ans = 1 for i in range(2,n): if prime[i]: continue dic = {} for j in range(i,n,i): prime[j] = 1 c = 0 now = j while now%i == 0: now //= i c += 1 dic[j] = c m = 0 for j in range(i,n,i): if (n-j)%i: m = max(m,dic[j]) else: m = max(m,dic[j]+dic[n-j]) ans *= pow(i,m,mod) ans %= mod print(ans)