#include <iostream>
#include <string>
#include <math.h>
#include <algorithm>
using namespace std;
int main(){
  int N;
  cin>>N;
  long long a,b,c,d;
  a=1; b=1; c=1;
  for(int i=0;i<N;i++){
    a*=10; b*=9; c*=8;
    a%=1000000007; b%=1000000007; c%=1000000007;
  }
  cout<<(a-2*b+c+2000000014)%1000000007<<endl;
  
  
  return 0;
}