local n = io.read("n")

local function pow_mod(x, y)
	local result = 1
	for i = 1, y do
		result = (result * x) % 1000000007
	end
	return result
end

local out = pow_mod(10, n)
out = (out - pow_mod(9, n)) % 1000000007
out = (out - pow_mod(9, n)) % 1000000007
out = (out + pow_mod(8, n)) % 1000000007
print(out < 0 and out + 1000000007 or out)
