N = input() mod = 10**9+7 NN = str(N) L = len(NN) # dp[i][j][k][l]:i桁目まで決めた時に,j:未満フラッグ,k:leading zero, l:mod100 dp = [[[[0]*100 for _ in range(2)] for _ in range(2)] for _ in range(L+1)] dp[0][0][1][1] = 1 for i in range(L): D = int(NN[i]) for less_f in range(2): for leading_f in range(2): for m in range(100): for d in range(10 if less_f else D+1): # 正整数じゃなくなる if leading_f==0 and d==0:continue dp[i+1][less_f or (d