
let n = Int(readLine()!)!
let devider = 1000_000_000 + 7

func powerOfTwo(num: Int, multiply: Int) -> Int {
    var result = 1
    for _ in 0..<num {
        result = (result * multiply) % devider
    }
    return result
}

let universe = powerOfTwo(num: n, multiply: 10)
let nWithoutZero = powerOfTwo(num: n, multiply: 9)
let nWithoutNine = powerOfTwo(num: n, multiply: 9)
let nWIthoutZeroAndNine = powerOfTwo(num: n, multiply: 8)

if n == 1 {
    print(0)
} else {
    let ans = universe - nWithoutZero - nWithoutNine + nWIthoutZeroAndNine % devider
    ans = (ans + devider) % devider
    print(ans)
}

