from itertools import product N = input() mod=10**9+7 def count(a): n = len(a) dp=[[[[0] * 2 for i in range(100)] for j in range(2)] for k in range(n+1)] dp[0][0][1][1] = 1 for i, less, mod100, leading0 in product(range(n), (0,1), range(100), (0,1)): max_d = 9 if less else int(a[i]) for d in range(max_d+1): if leading0==0 and d==0: continue less_ = less or d < max_d leading0_ = leading0 and d == 0 if leading0==1 and d==0: mod100_ = mod100 else: mod100_ = (mod100*d)%100 dp[i + 1][less_][mod100_][leading0_] = (dp[i][less][mod100][leading0]+dp[i + 1][less_][mod100_][leading0_])%mod return (dp[n][1][0][0]+dp[n][0][0][0])%mod print(count(N))