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

int main() {
  int64_t N,a10=1,a9=1,a8=1; cin>>N;
  rep(i,N){
    a10=(a10*10)%MOD;
    a9=(a9*9)%MOD;
    a8=(a8*8)%MOD;
  }
  cout<<(a10+a8-2*a9+2*MOD)%MOD;
}