#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<ll> vl;
typedef vector<vl> vl2;
const bool multiple_queries = false;
#define rep(i, n) for(ll i = 0; i < (n) ; ++i)
#define For(i, a, b) for(ll i = (a); i < (b) ; ++i)
#define revrep(i, n) for(ll i = (n) - 1; i >= 0 ; --i)
#define revFor(i, b, a) for(ll i = (b) - 1; i >= (a) ; --i)
#define all(v) v.begin(), v.end()
#define rall(v) (v).rbegin(), (v).rend()
#define popcount(i) __builtin_popcountl((i))
#define substring(s, start, end) s.substr((start), (end) - (start) + 1)

void print(){cout;}
void println(){cout << endl;}

template <class Head, class... Tail>
void print(Head&& head, Tail&&... tail) {
    cout << head;
    if (sizeof...(tail) != 0) cout << " ";
    print(forward<Tail>(tail)...);
}

template <class Head, class... Tail>
void println(Head&& head, Tail&&... tail) {
    cout << head;
    if (sizeof...(tail) != 0) cout << " ";
    println(forward<Tail>(tail)...);
}

const ll MOD = 1000000007;
// const ll MOD = 998244353;

struct mint {
    ll x;
    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, const mint& a) {return is >> a.x;}
ostream& operator<<(ostream& os, const mint& a) {return os << a.x;}
string to_string(mint a){return to_string(a.x);}
typedef std::vector<mint> vmi;
typedef std::vector<vmi> vmi2;
typedef std::vector<vmi2> vmi3;
typedef std::vector<vmi3> vmi4;

ll power_mod(ll a, ll power, ll mod){
    __int128_t value = 1;
    __int128_t b = a;
    while(power != 0){
        if (power & 1) value = (value * b) % mod;
        b = (b * b) % mod;
        power = power >> 1;
    }
    return value % mod;
}

void solve(){
    ll n;
    cin >> n;
    ll v1 = power_mod(10, n, MOD);
    ll v2 = power_mod(9, n, MOD);
    ll v3 = power_mod(8, n, MOD);
    mint ans = v1 - (v2 * 2 - v3);

    println(ans);
}

void test(ll num = 0, bool verbose = false){
    rep(i, max(1LL, num)){
        ll t = clock();
        if (verbose) cout << "\n#####" << " " << i + 1 << " " << "#####" << " " << "\n## Answer ##\n";
        solve();
        if (verbose) {cout << "\nElapsed Time:" << " " << 1000.0 * (clock() - t) / CLOCKS_PER_SEC << " " << "[ms]" << endl;}
    }
}

int main(void){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    #ifdef _LOCAL
        test(6, true);
    #else
        ll t = 0;
        if (multiple_queries) cin >> t;
        test(t, false);
    #endif
    return 0;
}

Measured memory_bytes: 3676