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