from math import gcd MOD = 10 ** 9 + 7 N = input() dp = {} def f(i): if i == 0: return 0 else: return gcd(i, 100) for i in range(1, int(N[0])): dp[f(i)] = dp.get(f(i), 0) + 1 same = f(int(N[0])) for n in N[1:]: n = int(n) ndp = {} for k, v in dp.items(): for i in range(10): ndp[f(k * i)] = ndp.get(f(k * i), 0) + v ndp[f(k * i)] %= MOD for i in range(n): ndp[f(same * i)] = ndp.get(f(same * i), 0) + 1 ndp[f(same * i)] %= MOD for i in range(10): ndp[f(i)] = ndp.get(f(i), 0) + 1 ndp[f(i)] %= MOD same = f(same * n) dp = ndp ans = dp.get(100, 0) if same == 100: ans += 1 print(ans % MOD)