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

int main() {
  int N;
  cin >> N;
  int64_t A,B,C;
  A=1; B=1; C=1;
  for(int i=0; i<N; i++){
    A=A*10%1000000007;
    B=B*8%1000000007;
    C=C*9%1000000007;
  }
  
  A+=1000000007;
  B+=1000000007;
  cout << (A+B-2*C)%1000000007 << endl;
}