Given a number , we define a function as the product of the digits of . We can then form a sequence x, p(x), p(p(x))... . The persistence of is then defined as the index (-based) of the first single digit number in the sequence. For example, using , we get the sequence 99, 9 \cdot 9 = 81, 8 \cdot 1 = 8. Thus, the persistence of is . You will be given , and you must find its persistence.
Each line contains one integer n\:(0 \le n \le 2 \cdot 10^9).
For each number print on a separate line its persistence.
Παράδειγμα 1