Maths Labyrinth: Count the Nines Answer

string