Problem 3. A natural number is written on the board. Nikolai noticed that he can append a digit to the right of it in two ways so that the resulting number is divisible by 9. In how many ways can he append a digit to the right of the given number so that the resulting number is divisible by 3?