#include <bits/stdc++.h>

namespace std {

template<class Fun>
class y_combinator_result {
  Fun fun_;
public:
  template<class T>
  explicit y_combinator_result(T &&fun): fun_(std::forward<T>(fun)) {}

  template<class ...Args>
  decltype(auto) operator()(Args &&...args) {
    return fun_(std::ref(*this), std::forward<Args>(args)...);
  }
};

template<class Fun>
decltype(auto) y_combinator(Fun &&fun) {
  return y_combinator_result<std::decay_t<Fun>>(std::forward<Fun>(fun));
}

} // namespace std

using namespace std;

#ifdef LOCAL
#include "/Users/thakchir/Desktop/CP/Library/Debug/Debug.cpp"
#else
#define debug(...) 42
#endif

template <uint32_t mod>
class Modular {
private:
    uint32_t n;

public:
    Modular(int64_t _n = 0) : n(uint32_t((_n >= 0 ? _n : mod - (-_n) % mod) % mod)) {}

    uint32_t get() const {
        return n;
    }

    bool operator==(const Modular &o) const {
        return n == o.n;
    }

    bool operator!=(const Modular &o) const {
        return n != o.n;
    }

    Modular& operator+=(const Modular &o) {
        n += o.n;
        n = (n < mod ? n : n - mod);
        return *this; 
    }

    Modular& operator-=(const Modular &o) {
        n += mod - o.n;
        n = (n < mod ? n : n - mod);
        return *this;
    }

    Modular& operator*=(const Modular &o) {
        n = uint64_t(n) * o.n % mod;
        return *this;
    }

    Modular& operator/=(const Modular &o) {
        return (*this) *= o.inv();
    }

    Modular operator+(const Modular &o) const {
        return Modular(*this) += o;
    }

    Modular operator-(const Modular &o) const {
        return Modular(*this) -= o;
    }

    Modular operator*(const Modular &o) const {
        return Modular(*this) *= o;
    }

    Modular operator/(const Modular &o) const {
        return Modular(*this) /= o;
    }

    Modular pow(uint64_t b) const {
        Modular ans(1), m = Modular(*this);
        while (b) {
            if (b & 1) {
                ans *= m;
            }
            m *= m;
            b >>= 1;
        }
        return ans;
    }

    Modular inv() const {
        int32_t a = n, b = mod, u = 0, v = 1;
        while (a) {
            int32_t t = b / a;
            b -= t * a;
            swap(a, b);
            u -= t * v;
            swap(u, v);
        }
        assert(b == 1);
        return Modular(u);
    }

    friend string to_string(const Modular &m) {
        return to_string(m.get());
    }
};

using Mint = Modular<int(1e9) + 7>;

void RunTestCase() {
  int n;
  cin >> n;
  auto dp = vector(n + 1, vector(2, vector(2, Mint(0))));
  auto seen = vector(n + 1, vector(2, vector(2, 0)));
  Mint answer = y_combinator([&](auto self, int ind, bool done_0, bool done_9) -> Mint {
    if (ind == n + 1) {
      return done_0 && done_9;
    }
    auto &ans = dp[ind][done_0][done_9];
    auto &vis = seen[ind][done_0][done_9];
    if (!vis) {
      vis = true;
      for (int curr = 0; curr <= 9; ++curr) {
        ans += self(ind + 1, done_0 || curr == 0, done_9 || curr == 9);
      }
    }
    return ans;
  })(1, 0, 0);
  cout << answer.get() << "\n";
}

int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  RunTestCase();
  return 0;
}

Measured memory_bytes: 362084