#[MathGolf](https://github.com/maxbergmark/mathgolf/blob/master/math_golf.txt), 9 [bytes](https://github.com/maxbergmark/mathgolf/blob/master/code_page.py)

 0ô+_▒╙2<▼

[Try it online.](https://tio.run/##DckxDkAwAIbR/buKpX@rLYm7iAUDsTiJRBP3MNrcpBcpb33rsM/TtoylmPeu@pyOfF62y@kpRVgcNZ5ApEEGCVnkUI08CiiiFvuXMR8) (Test cases `n=9` and `n=18` are excluded, since they time out.)

**Explanation:**

<!-- language-all: lang-python -->

 0 # Start with 0
 ▼ # Do-while false with pop,
 ô # using the following 6 commands:
 + # Add the (implicit) input-integer to the current value
 _ # Duplicate it
 ▒ # Convert it to a list of digits
 ╙ # Pop and push the maximum digit of this list
 2< # And check if this max digit is smaller than 2 (thus 0 or 1)
 # (after the do-while, the entire stack joined together is output implicitly)