import math N=int(input()) N=math.sqrt(N) N=int(N) ans=0 while N>0: ans+=1 N-=N%10 N/=10 print(ans)