const mod = BigInt(10**9 + 7)

const pow = (x, n) => {
  let r = 1n

  for (let i=0; i<n; i++)
    r = r * x % mod

  return r
}

const main = (input) => {
  const n = BigInt(input.trim())

  let a = pow(10n, n)
  let bc = pow(9n, n)
  let d = pow(8n, n)

  return console.log(`${(a-bc-bc+d) % mod}`)
}

process.env.MYTEST
  ? (process.env.MYTEST === 'test' ? test() : main(require('fs').readFileSync('dev/stdin', 'utf8')))
  : main(require('fs').readFileSync('/dev/stdin', 'utf8'))