#include <bits/stdc++.h>
using namespace std;
// #include <atcoder/all>
// using namespace atcoder;
using ll = long long;
using pii = pair<int, int>;
using vi = vector<int>;
using vb = vector<bool>;
using vs = vector<string>;
using vvi = vector<vi>;
using vp = vector<pii>;
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define sz(x) (int)((x).size())
#define all(x) (x).begin(), (x).end()
#define each(a, x) for (auto&& a : (x))
#define _overload3(_1, _2, _3, name, ...) name
#define rep1(n) rep2(_, n)
#define rep2(i, n) rep3(i, 0, n)
#define rep3(i, a, n) for (int i = (a); i < (n); ++i)
#define rep(...) _overload3(__VA_ARGS__, rep3, rep2, rep1)(__VA_ARGS__)
constexpr int inf = (1 << 30) - 1;
constexpr int mod = 1e9 + 7;
constexpr double eps = 1e-10;
constexpr int dx[] = {1, 0, -1, 0, 1, 1, -1, -1};
constexpr int dy[] = {0, 1, 0, -1, 1, -1, 1, -1};
template<typename T> constexpr void print(const T& t) {cout << t << "\n";}
template<typename T, typename U> constexpr bool chmax(T& a, const U& b) {if (a < b) a = b; return a < b;}
template<typename T, typename U> constexpr bool chmin(T& a, const U& b) {if (a > b) a = b; return a > b;}
template<typename T, typename U> istream& operator>>(istream& is, pair<T, U>& p) {is >> p.fi >> p.se; return is;}
template<typename T, typename U> ostream& operator<<(ostream& os, const pair<T, U>& p) {os << p.fi << " " << p.se; return os;}
template<typename T> istream& operator>>(istream& is, vector<T>& v) {rep(i, sz(v)) is >> v[i]; return is;}
template<typename T> ostream& operator<<(ostream& os, const vector<T>& v) {rep(i, sz(v)) os << v[i] << (i + 1 != sz(v) ? " " : ""); return os;}
struct Init {Init() {cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(10);}} init;

template<unsigned int m> struct Fp {
    unsigned int _v;

    constexpr Fp() : _v(0) {}
    constexpr Fp(long long v) {
        long long x = (long long)(v % (long long)(m));
        if (x < 0) x += m;
        _v = (unsigned int)(x);
    }

    static constexpr int getmod() { return m; }

    constexpr Fp& operator++() {
        _v++;
        if (_v == m) _v = 0;
        return *this;
    }
    constexpr Fp& operator--() {
        if (_v == 0) _v = m;
        _v--;
        return *this;
    }
    constexpr Fp operator++(int) {
        Fp tmp = *this;
        ++*this;
        return tmp;
    }
    constexpr Fp operator--(int) {
        Fp tmp = *this;
        --*this;
        return tmp;
    }

    constexpr Fp& operator+=(const Fp& rhs) {
        _v += rhs._v;
        if (_v >= m) _v -= m;
        return *this;
    }
    constexpr Fp& operator-=(const Fp& rhs) {
        _v -= rhs._v;
        if (_v >= m) _v += m;
        return *this;
    }
    constexpr Fp& operator*=(const Fp& rhs) {
        unsigned long long z = _v;
        z *= rhs._v;
        _v = (unsigned int)(z % m);
        return *this;
    }
    constexpr Fp& operator/=(const Fp& rhs) {
        return *this = *this * rhs.inv();
    }

    constexpr Fp operator+() const { return *this; }
    constexpr Fp operator-() const { return Fp() - *this; }

    constexpr Fp pow(long long n) const {
        Fp x = *this, r = 1;
        while (n) {
            if (n & 1) r *= x;
            x *= x;
            n >>= 1;
        }
        return r;
    }
    constexpr Fp inv() const {
        long long a = _v, b = m, u = 1, v = 0;
        while (b) {
            long long t = a / b;
            a -= t * b; swap(a, b);
            u -= t * v; swap(u, v);
        }
        u %= m;
        if (u < 0) u += m;
        return u;
    }

    friend constexpr Fp operator+(const Fp& lhs, const Fp& rhs) {
        return Fp(lhs) += rhs;
    }
    friend constexpr Fp operator-(const Fp& lhs, const Fp& rhs) {
        return Fp(lhs) -= rhs;
    }
    friend constexpr Fp operator*(const Fp& lhs, const Fp& rhs) {
        return Fp(lhs) *= rhs;
    }
    friend constexpr Fp operator/(const Fp& lhs, const Fp& rhs) {
        return Fp(lhs) /= rhs;
    }

    friend constexpr bool operator==(const Fp& lhs, const Fp& rhs) {
        return lhs._v == rhs._v;
    }
    friend constexpr bool operator!=(const Fp& lhs, const Fp& rhs) {
        return lhs._v != rhs._v;
    }

    friend constexpr istream& operator>>(istream& is, Fp& x) {
        long long tmp = 0;
        is >> tmp;
        x = tmp;
        return is;
    }
    friend constexpr ostream& operator<<(ostream& os, const Fp& x) {
        return os << x._v;
    }
};
using mint = Fp<mod>;

// 二項係数
template<typename T> struct bicoef {
    vector<T> fact_, inv_, finv_;
    constexpr bicoef() {}
    constexpr bicoef(int n) : fact_(n, 1), inv_(n, 1), finv_(n, 1) {
        init(n);
    }
    constexpr void init(int n) {
        fact_.assign(n, 1), inv_.assign(n, 1), finv_.assign(n, 1);
        int MOD = fact_[0].getmod();
        rep(i, 2, n) {
            fact_[i] = fact_[i - 1] * i;
            inv_[i] = -inv_[MOD % i] * (MOD / i);
            finv_[i] = finv_[i - 1] * inv_[i];
        }
    }
    constexpr T com(int n, int k) const {
        if (n < k || n < 0 || k < 0) return 0;
        return fact_[n] * finv_[k] * finv_[n - k];
    }
    constexpr T fact(int n) const {
        if (n < 0) return 0;
        return fact_[n];
    }
    constexpr T inv(int n) const {
        if (n < 0) return 0;
        return inv_[n];
    }
    constexpr T finv(int n) const {
        if (n < 0) return 0;
        return finv_[n];
    }
};
bicoef<mint> bc;


int main() {
    bc.init(1000100);
    int n; cin >>n;
    if (n == 1) {
        print(0);
        return 0;
    }
    mint a = 10;
    mint b = 9;
    mint c = 8;
    print(a.pow(n) - 2 * b.pow(n) + c.pow(n));
}

Measured memory_bytes: 15008