read n

declare -i mod=$(( 10**9 + 7 ))

function mod_pow() {
  declare -i base=$1
  declare -i exp=$2
  declare -i ret=1
  
  while [ $exp -ge 1 ]; do
    if [ $(( exp % 2 )) -eq 1 ]; then
      ret=$(( ret * base % mod ))
    fi
    base=$(( base * base % mod ))
    exp=$(( exp / 2 ))
  done
  
  echo $ret
}

declare -i all=$( mod_pow 10 n )
declare -i diff_1=$( mod_pow 9 n )
declare -i diff_2=$( mod_pow 8 n )

declare -i ans=$(( (2 * (all - diff_1) - (all - diff_2)) % mod ))

if [ $ans -lt 0 ]; then
  ans=$(( ans + mod ))
fi

echo $ans
