#include<bits/stdc++.h>
using namespace std;
using ll=long long;
ll powmod(ll x,ll y){
ll res=1;
  for(ll i=0;i<y;i++){
     res=res*x%1000000007;
  }
  return res;
}

int main(){
  int n;
  cin>>n;
  ll ans=powmod(10,n)-powmod(9,n)-powmod(9,n)+powmod(8,n);
  ans%=1000000007;
  ans=(ans+1000000007)%1000000007;
  cout<<ans<<endl;
  
  return 0;
}
