import sys input = sys.stdin.readline from collections import * N = input()[:-1] L = len(N) dp = [[[[0]*100 for _ in range(2)] for _ in range(2)] for _ in range(L+1)] dp[0][0][0][1] = 1 MOD = 10**9+7 for i in range(L): d = int(N[i]) for j in range(2): for k in range(2): for l in range(10 if j else d+1): if k==1 and l==0: continue for m in range(100): m2 = 1 if k==0 and l==0 else m*l%100 dp[i+1][j|(l0)][m2] += dp[i][j][k][m] dp[i+1][j|(l0)][m2] %= MOD print((dp[L][0][1][0]+dp[L][1][1][0])%MOD)