n=list(input()) mod=10**9+7 dp0=[[0]*100 for i in range(len(n)+1)] dp1=[[0]*100 for i in range(len(n)+1)] dp0[0][1]=1 for i in range(1,len(n)+1): x=int(n[i-1]) for j in range(100): if x!=0: dp0[i][(j*x)%100]+=dp0[i-1][j] for j2 in range(1,x): dp1[i][(j*j2)%100]+=dp0[i-1][j] for j2 in range(1,10): dp1[i][(j*j2)%100]+=dp1[i-1][j] for j in range(100): dp0[i][j]%=mod dp1[i][j]%=mod dp1[i][1]+=1 dp1[i][1]%=mod print((dp0[-1][0]+dp1[-1][0])%mod)