#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9+7;
int main() {
    ll n;
    cin >> n;
    ll x=1,y=1,z=1;
    for(ll i=0;i<n;i++){
        x*=10;x%=MOD;
        y*=9;y%=MOD;
        z*=8;z%=MOD;
    }
    y*=2;y%=MOD;
    ll ans=x-y+z;
    if(ans<0) ans+=MOD;
    ans%=MOD;
    cout << ans << endl;
}