#include using namespace std; using ll = long long; using vi = vector; using vll = vector; using vvi = vector; using vvll = vector; using vvvll = vector; using vs = vector; const int IntINF = 1 << 30; const ll LLINF = 1LL << 60; #define REP(i, a, n) for (ll i = (a); i < (ll)(n); ++i) #define rep(i, n) REP(i, 0, n) #define what_is(x) cerr << #x << " is " << x << endl; template ostream &operator<<(ostream &os, const pair &p) { os << p.first << " " << p.second; return os; } template ostream &operator<<(ostream &os, const vector &v) { rep(i, v.size()) { os << v[i] << (i < (ll)v.size() - 1 ? " " : ""); } return os; } template ostream &operator<<(ostream &os, const vector> &v) { rep(i, v.size()) { rep(j, v[i].size()) { os << v[i][j] << (j < (ll)v[i].size() - 1 ? " " : ""); } os << endl; } return os; } template ostream &operator<<(ostream &os, const map &v) { for (const auto &p : v) { os << p.first << ": " << p.second << endl; } return os; } inline void io_setup(int precision = 15) { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(precision); cerr << fixed << setprecision(precision); } constexpr int MOD1 = 1000000007; constexpr int MOD2 = 998244353; constexpr int MOD3 = 1000000009; template struct Mint { long long val; constexpr Mint(long long v = 0) noexcept : val(v % MOD) { if (val < 0) v += MOD; } constexpr int get_mod() { return MOD; } constexpr Mint operator-() const noexcept { return val ? MOD - val : 0; } constexpr Mint operator+(const Mint &r) const noexcept { return Mint(*this) += r; } constexpr Mint operator-(const Mint &r) const noexcept { return Mint(*this) -= r; } constexpr Mint operator*(const Mint &r) const noexcept { return Mint(*this) *= r; } constexpr Mint &operator+=(const Mint &r) noexcept { val += r.val; if (val >= MOD) val -= MOD; return *this; } constexpr Mint &operator-=(const Mint &r) noexcept { val -= r.val; if (val < 0) val += MOD; return *this; } constexpr Mint &operator*=(const Mint &r) noexcept { val = val * r.val % MOD; return *this; } constexpr bool operator==(const Mint &r) const noexcept { return this->val == r.val; } constexpr bool operator!=(const Mint &r) const noexcept { return this->val != r.val; } friend constexpr istream &operator>>(istream &is, Mint &x) noexcept { is >> x.val; x.val %= MOD; if (x.val < 0) x.val += MOD; return is; } friend constexpr ostream &operator<<(ostream &os, const Mint &x) noexcept { return os << x.val; } }; template struct ModBinomialCoefficient { private: vector fact, inv, fact_inv; public: constexpr ModBinomialCoefficient(int n) noexcept : fact(n, 1), inv(n, 1), fact_inv(n, 1) { int MOD = fact[0].get_mod(); for (int i = 2; i < n; ++i) { fact[i] = fact[i - 1] * i; inv[i] = -inv[MOD % i] * (MOD / i); fact_inv[i] = fact_inv[i - 1] * inv[i]; } } constexpr T combination(int n, int k) const noexcept { if (n < k || n < 0 || k < 0) return 0; return fact[n] * fact_inv[k] * fact_inv[n - k]; } }; using Mint1 = Mint; using Mint2 = Mint; using Mint3 = Mint; using vMint1 = vector; using vvMint1 = vector; using vvvMint1 = vector; int main() { io_setup(); int N; cin >> N; vvvMint1 dp(N + 1, vvMint1(2, vMint1(10, 0))); dp[0][0][9] = 1; rep(i, N) { int D = 9; rep(smaller, 2) { rep(j, 10) { if (smaller == 0) { rep(d, min(D + 1, (int)j + 1)) { dp[i + 1][d == D ? 0 : 1][d] += dp[i][smaller][j]; } } else { rep(d, j + 1) { dp[i + 1][smaller][d] += dp[i][smaller][j]; } } } } } Mint1 ans = 0; rep(i, 10) { ans += dp[N][0][i] + dp[N][1][i]; } cout << ans << endl; return 0; }