ll f(ll x){ if(x<10){ return 0; } ll y=1; while(x){ y*=x%10; x/=10; } return 1+f(y); } { ll@n; wt(f(n)); }