n = gets.to_i
a = "9" * n
a = a.to_i
cnt = 0

(0..a).each do |x|
  y = x.to_s.size
  if y < n
    z = n - y
    z.times do
      x = "0" + "#{x}"
    end
  else
    x = x.to_s
  end
  if x.include?("0") && x.include?("9")
    cnt += 1
  end
end

puts cnt % (10 ** 9 + 7)
