MOD = 1_000_000_007
n = gets.to_i

dp = Array.new(n + 1) { Array.new(2) { Array.new(2, 0) }}
dp[0][0][0] = 1

n.times do |i|
  dp[i+1][0][0] = (dp[i][0][0] * 8) % MOD
  dp[i+1][0][1] = (dp[i][0][0] + dp[i][0][1] * 9) % MOD
  dp[i+1][1][0] = (dp[i][0][0] + dp[i][1][0] * 9) % MOD
  dp[i+1][1][1] = (dp[i][1][0] + dp[i][0][1] + dp[i][1][1] * 10) % MOD
end

p dp[n][1][1]
