local mod=1000000007
local function powmod(x,n)
    local a=1
    for i=1,n do
        a=(a*x)%mod
    end
    return a
end

----------

local n=io.read("n")
local total=powmod(10,n)
local zorn=powmod(9,n)
local zandn=powmod(8,n)
print((total-zorn-zorn+zandn)%mod)