#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;




int main(){
    ll n; cin>> n;
    ll e=1000000007, f0=1, f9=1, f8=1;
    while(n){
        f0*=10;
        f0%=e;
        f9*=9;
        f9%=e;
        f8*=8;
        f8%=e;
        n--;
    }
    cout<< (f0-f9-f9+f8+e+e)%e<< endl;
}
