# Nの約数にしか止まらないから約数頂点上でのdp # しかしうまく実装できず人のを見る # https://yukicoder.me/submissions/872922 N = int(input()) def divisors(n): lower_divisors , upper_divisors = [], [] i = 1 while i*i <= n: if n % i == 0: lower_divisors.append(i) if i != n // i: upper_divisors.append(n//i) i += 1 return lower_divisors + upper_divisors[::-1] def factorization_dic(n): #辞書形式に改造 arr = {} temp = n for i in range(2, int(-(-n**0.5//1))+1): if temp%i==0: cnt=0 while temp%i==0: cnt+=1 temp //= i arr[i] = cnt if temp!=1: arr[temp] = 1 if arr==[]: arr[n] = 1 return arr N_divs = divisors(N) L = len(N_divs) all_factors = [] for d in N_divs: all_factors.append(factorization_dic(d)) #print(all_factors) mod = 998244353 # Nの約数を大きい方から1まで並べるのはうまくいかないので小さい方からやる # dp[i]パターン数 dp = [0]*L dp[0] = 1 for i in range(L): for j in range(i+1, L): if N_divs[j]%N_divs[i] != 0: continue temp = dp[i] for p in all_factors[i]: if p == 1: continue p_count_current = all_factors[i][p] p_count_new = all_factors[j][p] if p_count_current == p_count_new: # 公式解説に説明あるけどよくわかんないね #print('i', i, 'j', j, 'p', p, p_count_current, p_count_new) temp *= p_count_new+1 temp %= mod dp[j] += temp dp[j] %= mod ans = dp[L-1]%mod print(ans)