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