#include <bits/stdc++.h>
using namespace std;
 
int main() {
  int N;
  cin >> N;
  long int a=1,b=1,c=2;
  for(int i=0;i<N;i++){
    a*=10;
    b*=8;
    c*=9;
    a%=1000000007;
    b%=1000000007;
    c%=1000000007;
  }
  cout << (1000000007+a+b-c)%1000000007 <<endl;
}
