// Original C++ solution (slower):
#include <bits/stdc++.h>

using namespace std;

/* typedef */

typedef long long ll;

typedef pair<int, int> pii;

/* constant */

const int INF = 1 << 30;

const ll LINF = 1LL << 61;

const int NIL = -1;

const int MAX = 10000;

const int mod = 1000000007;

const double pi = 3.141592653589;

/* struct for mod Calculation*/

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 {

            mint res(*this);

            return res += a;

        }

        mint operator-(const mint a) const {

            mint res(*this);

            return res -= a;

        }

        mint operator*(const mint a) const {

            mint res(*this);

            return res *= 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 {

            mint res(*this);

            return res /= a;

        }

};

istream& operator>>(istream& is, const mint& a) { return is >> a.x;}

ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}

/* global variables */

/* function */

/* main */

int main(){

    int n;

    cin >> n;

    vector<vector<mint>> dp(4, vector<mint>(n+1, 0));



    // init;

    dp[0][0] = 1;

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

        dp[3][i+1] += dp[3][i] * 10;

        // 0, 9

        dp[3][i+1] += dp[1][i] + dp[2][i];

        // 0 -> 0, 9 -> 9

        dp[1][i+1] += dp[1][i] * 9;

        dp[2][i+1] += dp[2][i] * 9;

        // non -> 0, non -> 9

        dp[1][i+1] += dp[0][i];

        dp[2][i+1] += dp[0][i];

        // non -> non

        dp[0][i+1] += dp[0][i] * 8;

    }

    cout << dp[3][n] << '\n';

}


// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

using namespace std;

/* typedef */

typedef long long ll;

typedef pair<int, int> pii;

/* constant */

const int INF = 1 << 30;

const ll LINF = 1LL << 61;

const int NIL = -1;

const int MAX = 10000;

const int mod = 1000000007;

const double pi = 3.141592653589;

/* struct for mod Calculation*/

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 {

            mint res(*this);

            return res += a;

        }

        mint operator-(const mint a) const {

            mint res(*this);

            return res -= a;

        }

        mint operator*(const mint a) const {

            mint res(*this);

            return res *= 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 { mint res(*this); return res /= a; }

        bool operator<(const mint& a)const{ return x < a.x;}

        bool operator==(const mint& a)const{ return x == a.x;}

};

mint ex(mint x, ll t) { return x.pow(t);}

istream& operator>>(istream& is, const mint& a) { return is >> a.x;}

ostream& operator<<(ostream& os, const mint& a) { return os << a.x;}

/* global variables */

/* function */

void solve1() {

    int n;

    cin >> n;

    vector<vector<mint>> dp(4, vector<mint>(n+1, 0));



    // init;

    dp[0][0] = 1;

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

        dp[3][i+1] += dp[3][i] * 10;

        // 0, 9

        dp[3][i+1] += dp[1][i] + dp[2][i];

        // 0 -> 0, 9 -> 9

        dp[1][i+1] += dp[1][i] * 9;

        dp[2][i+1] += dp[2][i] * 9;

        // non -> 0, non -> 9

        dp[1][i+1] += dp[0][i];

        dp[2][i+1] += dp[0][i];

        // non -> non

        dp[0][i+1] += dp[0][i] * 8;

    }

    cout << dp[3][n] << '\n';

}



void solve2() {

    int n;

    cin >> n;

    // 包除原理

    // 全体 - (0を含まない順列) - (9を含まない順列) + (0, 9を含まない順列)

    // 10 ** n - 9 ** n - 9 ** n + 8 ** n

    mint ans = ex(10, n) - (mint)2 * ex(9, n) + ex(8, n);

    cout << ans << '\n';

}

/* main */

int main(){

    // solve1();

    solve2();

}


// Fastest known solution for this problem: