package main import ( "fmt" "math" ) func main() { var n int _, _ = fmt.Scan(&n) mod := int(math.Pow10(9)) + 7 fmt.Println(((4*PowMod793(10, n, mod) - 1) * PowMod793(3, mod-2, mod)) % mod) } func PowMod793(x, n, mod int) int { if n <= 1 { return x } else if n%2 == 1 { return (PowMod793(x, n-1, mod) * x) % mod } else { m := PowMod793(x, n/2, mod) return (m * m) % mod } }