n is a digit such that the 5-digit number n878n is divisible by 9. What is the value of n?