#include<bits/stdc++.h>
#define   ll                           		long long int
#define   ull                           	unsigned long long int
#define   fo(number1,number2,number3)  		for(int number1=number2;number1<=number3;++number1)
#define   rfo(number1,number2,number3) 		for(int number1=number2;number1>=number3;--number1)
#define   pi                          		pair<int,int>
#define   vLL                          		vector<ll>
#define	  vi								vector<int>
#define   pb                          		push_back
#define   eb 								emplace_back
#define   lb								lower_bound
#define   ub								upper_bound
#define   mp                          		make_pair
#define   fastio                      		ios_base::sync_with_stdio(false);cin.tie(NULL);
#define   cps                         		CLOCKS_PER_SEC
#define   decimal(k)                  		fixed<<setprecision(k)
#define   PI                          		3.14159265359
#define   ff                           		first
#define   ss                           		second
#define   all(V)                      		(V).begin(),(V).end()
#define   alla(a,n) 						a, a+n
#define   sz(v) 							(ll)v.size()
#define   SORT(v) 							sort(all(v))
#define   REV	 							reverse
#define   SUM(v) 							accumulate(v.begin(),v.end(),0)
#define   MAX 								max_element
#define   MIN	 							min_element
#define   UNIQUE(v) 						SORT(v); v.erase(unique(v.begin(),v.end()),v.end())
#define   UNIQUEA(a,n) 						unique(a,a+n)-a
#define   MAXA(a,n) 						max_element(a,a+n)
#define   MINA(a,n) 						min_element(a,a+n)
#define   SORTA(a, n) 						sort(alla(a, n))
#define   REVA(a, n) 						reverse(alla(a, n))
#define   mymax                       		1000000000000000100
#define   mymin                      		-1000000001
#define   bitcount                    		__builtin_popcount
#define   gcd                         		__gcd
#define   MOD                         		(ll)1000000007
#define   TEST(t) 					  		int tc; cin>>tc; fo(t,1,tc)
#define   VECT(v,n)							ll n; cin >> n; vLL v(n); fo(i,0,n-1) cin >> v[i];
#define   NUM(n)							ll n; cin >> n;
#define	  STRING(s)							string s; cin >> s;
#define   TS								to_string
#define   len(s)							(s).length()
#define   line 						  		cout << "\n";
#define   el								"\n"
using namespace std;

ll power(ll x,ll y,ll m){            //power(x,y)=x^y  %m;
    if(y==0)return 1;
    ll a=power(x,y/2,m);
    if(y%2){
        return (a*((a*x)%m))%m;
    }
    else{
        return (a*a)%m;
    }
}
ll mod_inverse(ll x,ll m){
    return power(x,m-2,m);
}
ll fact(ll n){
	ll f = 1;
    for(ll i = n+1;--i;)
    {
    	f = f*i;
    }
    return f;
}
ll ncr(ll n, ll r) {
    if(r > n - r) r = n - r;
    ll ans = 1;
    ll i;

    for(i = 1; i <= r; i++) {
        ans *= n - r + i;
        ans /= i;
    }

    return ans;
}
int isPal(string s){
    int len=s.size();
    int flag=1;
    for(int i=0;i<len;++i){
        if(s[i]!=s[len-i-1]){
            flag=0;
			break;
        }
    }
    return flag;
}

ll isEven(ll n)
{
	return (n & 1)> 0?0:1;
}

ll isPrime(ll n)
{
	if(n < 2)
		return 0;
	for(ll i = 2; i*i <= n; i++)
		if(n%i == 0)
			return 0;
	return 1;
}
ll pow2(ll n)
{
	return (ceil(log2(n)) == floor(log2(n)))?1:0;
}
ll sumD(ll n)
{
	if(n == 0)
		return 0;
	return (n%10) + sumD(n/10);
}
vLL factor(ll n)
{
	vLL v;
	fo(i,1,n)
		if(n%i == 0)
			v.pb(i);
	return v;
}
vLL pfactor(ll n)
{
	vLL v;
    while (n % 2 == 0)
    {
        v.pb(2);
        n = n/2;
    }
    for (ll i = 3; i <= sqrt(n); i = i + 2)
    {
        while (n % i == 0)
        {
            v.pb(i);
            n = n/i;
        }
    }
    if (n > 2)
        v.pb(n);
	return v;
}

string stringsort(string &s)
{
	string sr="";
	ll m[26] ={0};
	fo(i,0,len(s)-1)
		m[s[i]-'a']++;
	fo(i,0,25)
		while(m[i]--)
			sr += (char)(i+'a');
	return sr;
}
bool scompare(string &s1, string &s2)
{
	int l1 = sz(s1), l2 = sz(s2);
	bool dis = true;
	if(s1[0] != s2[0])
		dis = false;
	else if(s1[l1-1] != s2[l2-1])
		dis = false;
	else if(l1!= l2)
		dis = false;
	else
	{
		fo(i,1,l1-2)
			if(s1[i] != s2[i])
				dis = false;
	}
	return dis;

}
void pop_front(vLL &v)
{
    if (v.size() > 0) {
        v.erase(v.begin());
    }
}
/***************************code begins here*****************************/
int main()
{
	fastio;
	//freopen("input.txt","r",stdin);
	//freopen("output.txt","w",stdout);
	int n;
	cin >> n;
		ll x1 = power(10,n,MOD);
		ll x2 = power(9,n,MOD);
		ll x3 = power(8,n,MOD);
		ll res = (x1%MOD-2*x2%MOD+x3%MOD + 2*MOD)%MOD;
		cout << res;













	return 0;


}









Measured memory_bytes: 3672