#include using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define ALL(v) (v).begin(), (v).end() using ll = long long; constexpr int INF = 1e9; constexpr long long LINF = 1e18; constexpr long long MOD = 1e9 + 7; /* 実行時MODint : template static int MOD; cin >> MOD; */ template struct Mint { int x; constexpr Mint() : x(0) {} constexpr Mint(long long t) : x(t >= 0 ? (t % MOD) : (MOD - (-t) % MOD) % MOD) {} Mint pow(int n) { Mint res(1), t(x); while (n > 0) { if (n & 1) res *= t; t *= t; n >>= 1; } return res; } Mint inv() const { int a = x, b = MOD, u = 1, v = 0, t; while (b > 0) { t = a / b; a -= t * b; swap(a, b); u -= t * v; swap(u, v); } return Mint(u); } Mint &operator+=(Mint a) { x += a.x; if (x >= MOD) x -= MOD; return *this; } Mint &operator-=(Mint a) { x += MOD - a.x; if (x >= MOD) x -= MOD; return *this; } Mint &operator*=(Mint a) { x = int(1LL * x * a.x % MOD); return *this; } Mint &operator/=(Mint a) { return (*this) *= a.inv(); } Mint operator+(Mint a) const { return Mint(x) += a; } Mint operator-(Mint a) const { return Mint(x) -= a; } Mint operator*(Mint a) const { return Mint(x) *= a; } Mint operator/(Mint a) const { return Mint(x) /= a; } Mint operator-() const { return Mint(-x); } bool operator==(const Mint a) { return x == a.x; } bool operator!=(const Mint a) { return x != a.x; } bool operator<(const Mint a) { return x < a.x; } friend ostream &operator<<(ostream &os, const Mint &a) { return os << a.x; } friend istream &operator>>(istream &is, Mint &a) { int t; is >> t; a = Mint(t); return (is); } }; int n; bool memo[100001][2][10]; Mint<> dp[100001][2][10]; Mint<> rec(int digit, bool tight, int last) { if (memo[digit][tight][last]) return dp[digit][tight][last]; memo[digit][tight][last] = true; if (digit == n) return dp[digit][tight][last] = 1; Mint<> res = 0; for (int i = last; i <= 9; i++) { res += rec(digit + 1, tight && i == 9, i); } return dp[digit][tight][last] = res; } signed main() { cin >> n; cout << rec(0, true, 0) << endl; return 0; }