#include <iostream>

using namespace std;
using ll = long long;
const ll MOD = 1000000007;

int main() {
  ll N, dp[4]{1};
  cin >> N;
  for (int i = 0; i != N; ++i) {
    dp[3] = (dp[1] + dp[2] + dp[3] * 10) % MOD;
    dp[2] = (dp[0] + dp[2] * 9) % MOD;
    dp[1] = (dp[0] + dp[1] * 9) % MOD;
    dp[0] = dp[0] * 8 % MOD;
  }
  cout << dp[3] << endl;
}
