#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <math.h>
#include <map>
#include <queue>
#include <cassert>
#include <iomanip>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define ALL(a) (a).begin(), (a).end()
#define rALL(a) (a).rbegin(), (a).rend()
using namespace std;
using ll = long long;
using P = pair<ll, ll>;
const int iINF = 1001001001;
const long long llINF = 1LL << 60;
const int mod = 1000000007;
struct mint {
    ll x; // typedef long long ll;
    mint(ll x = 0) :x((x% mod + mod) % mod) {}
    mint operator-() const { return mint(-x); }
    mint& operator+=(const mint a) {
        if ((x += a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator-=(const mint a) {
        if ((x += mod - a.x) >= mod) x -= mod;
        return *this;
    }
    mint& operator*=(const mint a) { (x *= a.x) %= mod; return *this; }
    mint operator+(const mint a) const { return mint(*this) += a; }
    mint operator-(const mint a) const { return mint(*this) -= a; }
    mint operator*(const mint a) const { return mint(*this) *= a; }
    mint pow(ll t) const {
        if (!t) return 1;
        mint a = pow(t >> 1);
        a *= a;
        if (t & 1) a *= *this;
        return a;
    }

    // for prime mod
    mint inv() const { return pow(mod - 2); }
    mint& operator/=(const mint a) { return *this *= a.inv(); }
    mint operator/(const mint a) const { return mint(*this) /= a; }
};
istream& operator>>(istream & is, mint & a) { return is >> a.x; }
ostream& operator<<(ostream & os, const mint & a) { return os << a.x; }

// *** フェルマーの小定理を用いたCombination計算(modの構造体と一緒に使う) *** //
struct combination {
    vector<mint> fact, ifact;
    combination(int n) :fact(n + 1), ifact(n + 1) {
        assert(n < mod);
        fact[0] = 1;
        for (int i = 1; i <= n; ++i) fact[i] = fact[i - 1] * i;
        ifact[n] = fact[n].inv();
        for (int i = n; i >= 1; --i) ifact[i - 1] = ifact[i] * i;
    }
    mint operator()(int n, int k) {
        if (k < 0 || k > n) return 0;
        return fact[n] * ifact[k] * ifact[n - k];
    }
};
int main()
{
    /*int x; cin >> x;
    if (x == 0)cout << 1 << endl;
    else cout << 0 << endl;
    */

    /*ll a, b, c, d; cin >> a >> b >> c >> d;
    ll ans = a * c;
    ans = max(ans, a * d);
    ans = max(ans, b * c);
    ans = max(ans, b * d);
    cout << ans << endl;
    */

    ll n; cin >> n;
    if (n == 1) {
        cout << 0 << endl;
        return 0;
    }
    else if (n == 2) {
        cout << 2 << endl;
        return 0;
    }
    ll ans = 1;
    rep(i, n) {
        ans *= 10;
        ans %= mod;
    }
    ll res = 1;
    rep(i, n) {
        res *= 9;
        res %= mod;
    }
    res *= 2;
    res %= mod;
    ll res2 = 1;
    rep(i, n) {
        res2 *= 8;
        res2 %= mod;
    }
    res -= res2;
    while (res < 0) res += mod;
    ans -= res;
    while (ans < 0) ans += mod;
    cout << ans << endl;

    /*int s; cin >> s;
    if (s <= 2) {
        cout << 0 << endl;
        return 0;
    }
    int rp = s / 3;
    mint ans = 1;
    for (int i = 2; i <= rp; ++i) {
        ll res = s - ll(3) * i;
        combination c(res + i - 1);
        mint a = c(res + i - 1, i - 1);
        ans += a;
    }
    cout << ans << endl;
    */
    return 0;
}

Measured memory_bytes: 3620