#include<bits/stdc++.h>
#define ll unsigned long long int
using namespace std;
int main()
{
	ll n,i,a=1,b=1,c=1,ans=0,mod=1e9+7;
	cin>>n;
	for(i=1;i<=n;i++)
	{
	  a=((a*10)+mod)%mod;
	  b=((b*9)+mod)%mod;
	  c=((c*8)+mod)%mod; 	
	}
	ans=(a+c-b-b+5*mod)%mod;
	cout<<ans;
	return 0;
}