#pragma GCC optimize("O0") #include using namespace std; using ll=long long; int main(){ ll N; cin>>N; ll x=N; ll ans=0; while(x>=10){ ll t=1; while(x>0){ t*=x%10; x/=10; } x=t; ans++; } cout<