// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;



// THINK: INT vs LONG LONG?



const int MOD = 1e9 + 7;



// MODULAR INTEGER - Start of snippet

template<const int &MOD>

struct _m_int {

    int val;

    /*

    ** MODULAR INTEGER TEMPATE - credited to Neal Wu

    */

    _m_int(long long v = 0) {

        if (v < 0) v = v % MOD + MOD;

        if (v >= MOD) v %= MOD;

        val = int(v);

    }

 

    _m_int(uint64_t v) {

        if (v >= MOD) v %= MOD;

        val = int(v);

    }

 

    _m_int(int v) : _m_int((long long) v) {}

    _m_int(unsigned v) : _m_int(uint64_t(v)) {}

 

    static int inv_mod(int a, int m = MOD) {

        // https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm#Example

        int g = m, r = a, x = 0, y = 1;

        while (r != 0) {

            int q = g / r;

            g %= r; swap(g, r);

            x -= q * y; swap(x, y);

        }

        return x < 0 ? x + m : x;

    }

 

    explicit operator int() const { return val; }

    explicit operator unsigned() const { return val; }

    explicit operator long long() const { return val; }

    explicit operator uint64_t() const { return val; }

    explicit operator double() const { return val; }

    explicit operator long double() const { return val; }

 

    _m_int& operator+=(const _m_int &other) {

        val -= MOD - other.val;

        if (val < 0) val += MOD;

        return *this;

    }

 

    _m_int& operator-=(const _m_int &other) {

        val -= other.val;

        if (val < 0) val += MOD;

        return *this;

    }

 

    static unsigned fast_mod(uint64_t x, unsigned m = MOD) {

#if !defined(_WIN32) || defined(_WIN64)

        return unsigned(x % m);

#endif

        // Optimized mod for Codeforces 32-bit machines.

        // x must be less than 2^32 * m for this to work, so that x / m fits in an unsigned 32-bit int.

        unsigned x_high = unsigned(x >> 32), x_low = unsigned(x);

        unsigned quot, rem;

        asm("divl %4\n"

            : "=a" (quot), "=d" (rem)

            : "d" (x_high), "a" (x_low), "r" (m));

        return rem;

    }

 

    _m_int& operator*=(const _m_int &other) {

        val = fast_mod(uint64_t(val) * other.val);

        return *this;

    }

 

    _m_int& operator/=(const _m_int &other) {

        return *this *= other.inv();

    }

 

    friend _m_int operator+(const _m_int &a, const _m_int &b) { return _m_int(a) += b; }

    friend _m_int operator-(const _m_int &a, const _m_int &b) { return _m_int(a) -= b; }

    friend _m_int operator*(const _m_int &a, const _m_int &b) { return _m_int(a) *= b; }

    friend _m_int operator/(const _m_int &a, const _m_int &b) { return _m_int(a) /= b; }

 

    _m_int& operator++() {

        val = val == MOD - 1 ? 0 : val + 1;

        return *this;

    }

 

    _m_int& operator--() {

        val = val == 0 ? MOD - 1 : val - 1;

        return *this;

    }

 

    _m_int operator++(int) { _m_int before = *this; ++*this; return before; }

    _m_int operator--(int) { _m_int before = *this; --*this; return before; }

 

    _m_int operator-() const {

        return val == 0 ? 0 : MOD - val;

    }

 

    friend bool operator==(const _m_int &a, const _m_int &b) { return a.val == b.val; }

    friend bool operator!=(const _m_int &a, const _m_int &b) { return a.val != b.val; }

    friend bool operator<(const _m_int &a, const _m_int &b) { return a.val < b.val; }

    friend bool operator>(const _m_int &a, const _m_int &b) { return a.val > b.val; }

    friend bool operator<=(const _m_int &a, const _m_int &b) { return a.val <= b.val; }

    friend bool operator>=(const _m_int &a, const _m_int &b) { return a.val >= b.val; }

 

    _m_int inv() const {

        return inv_mod(val);

    }

 

    _m_int pow(long long p) const {

        if (p < 0)

            return inv().pow(-p);

        _m_int a = *this, result = 1;

        while (p > 0) {

            if (p & 1)

                result *= a;

            p >>= 1;

            if (p > 0)

                a *= a;

        }

        return result;

    }

 

    friend ostream& operator<<(ostream &os, const _m_int &m) {

        return os << m.val;

    }

};

// MODULAR INTEGER - End of snippet

 

using Mint = _m_int<MOD>;



vector<Mint> inv, factorial, inv_factorial;

 

void prepare_factorials(int maximum) {

    inv = {0, 1};

    factorial = inv_factorial = {1, 1};

 

    maximum = max(maximum, 1);

    inv.resize(maximum + 1);

    factorial.resize(maximum + 1);

    inv_factorial.resize(maximum + 1);

 

    for (int i = 2; i <= maximum; i++) {

        inv[i] = inv[MOD % i] * (MOD - MOD / i);

        factorial[i] = i * factorial[i - 1];

        inv_factorial[i] = inv[i] * inv_factorial[i - 1];

    }

}

 

Mint choose(long long n, long long r) {

	if (n == r) return 1;

    if (r < 0 || r > n) return 0;

    return factorial[n] * inv_factorial[r] * inv_factorial[n - r];

}

 

Mint inv_choose(long long n, long long r) {

    assert(0 <= r && r <= n);

    return inv_factorial[n] * factorial[r] * factorial[n - r];

}

 

Mint permute(long long n, long long r) {

    if (r < 0 || r > n) return 0;

    return factorial[n] * inv_factorial[n - r];

}

 

Mint inv_permute(long long n, long long r) {

    assert(0 <= r && r <= n);

    return inv_factorial[n] * factorial[n - r];

}



// MOD must be prime for inverse algorithm above





int main() {

	ios::sync_with_stdio(0);

	cin.tie(0);



	int n; cin >> n;

	prepare_factorials(n);

	Mint a1 = Mint(10).pow(n);

	Mint a2 = 0;

	for (int i = 1; i <= n; ++i) {

		a2 += (choose(n, i) * Mint(8).pow(n - i));

	}

	a2 *= 2;

	a2 += Mint(8).pow(n);

	cout << a1 - a2 << endl;



	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 2.3354772765602956x):
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

const int MOD = 1e9 + 7;



int mpow(int a, int b) {

	int res = 1;

	while (b) {

		if (b & 1) res = (long long) res * a % MOD;

		a = (long long) a * a % MOD;

		b >>= 1;

	}

	return res;

}



int main() {

	int n; cin >> n;

	int ans = ((ll) mpow(10, n) + mpow(8, n)) % MOD;

	for (int rep = 0; rep < 2; ++rep) 

		ans = (ans - mpow(9, n) + MOD) % MOD;

	cout << ans << endl;

	return 0;

}