#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int MOD = 1000000007;

int main() {
  int N;
  long long ten=1,nine=1,eight=1;
  cin>>N;
  rep(i,N){ten=(ten*10)%MOD;
          nine=(nine*9)%MOD;
          eight=(eight*8)%MOD;}
  ten=(2*MOD+ten-2*nine+eight)%MOD;  
  cout<<ten<<endl;
}