#include <bits/stdc++.h>
using namespace std;


int main() {

int N;
  long long int N8=1;
  long long int N9=-1;
  long long int N10=1;

cin >> N;
  for(int i=0;i<N;i++){
    N8=(8*N8)%1000000007LL;
    N9=(9*N9)%1000000007LL;
    N10=(10*N10)%1000000007LL;
  }
  

cout << (N10+2*N9+N8+400000002800LL)%1000000007LL;

}