def ndlist(shape: list[int], *, val=0) -> list: assert len(shape) > 0 and all(s > 0 for s in shape) def rec(p): if p == len(shape)-1: return [val] * shape[p] return [rec(p+1) for _ in range(shape[p])] return rec(0) def digit_dp(s: str) -> int: ds = [int(c) for c in s] nd = len(ds) dp = ndlist([nd+1, 2, 2, 10]) # dp[i][j][k] # i : i 桁目までみた # j : n 未満か(j=0 完全一致 j=1 より小さい) # k : leading zero # m : 末尾の数字 dp[0][0][1][0] = 1 for i in range(nd): for j in range(2): to = ds[i] if j == 0 else 9 for k in range(2): for m in range(10): for x in range(m, to+1): nj = j | (x < to) nk = k & (x == 0) nm = 0 if nk else x dp[i+1][nj][nk][nm] += dp[i][j][k][m] dp[i+1][nj][nk][nm] %= MOD res = 1 for i in range(10): res += dp[nd][1][0][i] res %= MOD return res MOD = 10**9 + 7 N = int(input()) ans = digit_dp('1' + '0' * N) print(ans)