# 1次元dp # dp[i] 要素合計iで、要素すべてが1以上の整数で、すべてが倍数関係、のパターン数 # dp[1] = 1 for [1] # dp[2] = 2 for [1, 1] and [2] # dp[3] = 3 for [1, 1, 1], [1, 2], and [3] # dp[4] = 5 for [1, 1, 1, 1], [1, 1, 2], [1, 3], [2, 2] and [4] # dp[5] = 6 for [1, 1, 1, 1, 1], [1, 1, 1, 2], [1, 1, 3], [1, 2, 2], [1, 4], [5] # 遷移が思いつかなかった # 公式解説より、数列の第1項は常にiの約数であり、それをjとする # その数列のすべての要素はjで割り切れるのでjで割ると、第1項は1となり、残りの項の数はdp[i//j-1]となる 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] M = int(input()) mod = 10**9+7 dp = [0]*(M+1) dp[0] = 1 #便宜的に1とする for i in range(1, M+1): divs = divisors(i) for d in divs: dp[i] += dp[i//d-1] dp[i] %= mod #print(dp) ans = dp[M]%mod print(ans)