let n = Int(readLine()!)!
let mod = 1000000007

var ten = 1
var nine = 1
var eight = 1
for _ in 1...n {
    ten *= 10
    ten %= mod

    nine *= 9
    nine %= mod

    eight *= 8
    eight %= mod
}

let result = ten - eight - ((nine - eight) * 2)
if result >= 0 {
    print(result)
} else {
    print(mod + result)
}
