#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define M 1000000007
int main(){
  ll n;
  cin>>n;
  ll a1=1;
  ll a2=1;
  ll a3=1;
  while(n--){
  	a1 = (a1*10)%M; 
  	a2 = (a2*9)%M;
  	a3 = (a3*8)%M;
  }
  ll ans = (a1+a3)%M;
  ans = ans - ((2*a2)%M);
  if(ans<0){
  	ans = ans + M;
  }
  cout<<ans<<endl;
  
  return 0;
}