import Foundation

let divider = 1000000007

extension Int {
    func pow(_ x: Int) -> Int {
        if x == 0 {
            return 1
        } else {
            return self * self.pow(x - 1) % divider
        }
    }
}

let n = Int(readLine()!)!
let result = (10.pow(n) - 9.pow(n) - 9.pow(n) + 8.pow(n)) % divider
print(result < 0 ? result + divider : result)
