#include using namespace std; #define rep(i,j,n) for(int i=j;i pi; template using vt = vector; template using vvt = vector>; i64 gcd(i64 n, i64 m) {return (m == 0? n : gcd(m, n % m));} i64 lcm(i64 n, i64 m) {return (n / gcd(n, m) * m);} int dx[] = {1, 0, -1, 0}; int dy[] = {0, 1, 0, -1}; template class ModInt { private: std::int_fast64_t value; public: ModInt() : value(0) {} ModInt(std::int_fast64_t x) : value(x % MOD) { if(value < 0) value += MOD; } ModInt &operator+=(const ModInt &x) { value += x.value; if(value >= MOD) value -= MOD; return *this; } ModInt &operator-=(const ModInt &x) { if(value < x.value) value += MOD; value -= x.value; return *this; } ModInt &operator*=(const ModInt &x) { value = value * x.value % MOD; return *this; } ModInt &operator/=(const ModInt &x) { *this *= x.inverse(); return *this; } ModInt operator-() const { return ModInt(-value); } ModInt operator+(const ModInt &x) const { return ModInt(*this) += x; } ModInt operator-(const ModInt &x) const { return ModInt(*this) -= x; } ModInt operator*(const ModInt &x) const { return ModInt(*this) *= x; } ModInt operator/(const ModInt &x) const { return ModInt(*this) /= x; } bool operator==(const ModInt *x) const { return value == x.value; } bool operator!=(const ModInt *x) const { return value != x.value; } ModInt inverse() const { std::int_fast64_t a = value, b = MOD, u = 1, v = 0, t; while(b > 0) { t = a / b; std::swap(a -= t * b, b); std::swap(u -= t * v, v); } return ModInt(u); } ModInt pow(int64_t n) const { ModInt ret(1), mul(value); while(n > 0) { if(n & 1) ret *= mul; mul *= mul; n >>= 1; } return ret; } friend std::ostream &operator<<(std::ostream &os, const ModInt &x) { return os << x.value; } friend std::istream &operator>>(std::istream &is, ModInt &x) { std::int_fast64_t t; is >> t; x = ModInt(t); return is; } static std::int_fast64_t get_mod() { return MOD; } }; using modint = ModInt; int main() { cin.tie(0); ios::sync_with_stdio(false); int n; cin >> n; int l = n + 1; vvt> dp(l + 1, vvt(2, vt(10, modint(0)))); dp[0][0][0] = 1; rep(i, 0, l) { int d = 0; if(i == 0) d = 1; rep(smaller, 0, 2) { rep(j, 0, (smaller ? 9 : d) + 1) { rep(k, 0, 10) { if(j >= k) dp[i + 1][smaller || j < d][j] += dp[i][smaller][k]; } } } } modint ans(0); rep(i, 0, 10) ans += dp[l][0][i] + dp[l][1][i]; cout << ans << endl; }