#n 10**10

#sqrtn 10**5

ans=10**6

n=int(eval(input()))

for i in range(1,int(n**0.5)+1):

  if n%i==0:

    ans=min(len(str(n//i)),ans)

    

print(ans)
def F(a,b):

  return max(len(str(a)),len(str(b)))

n=int(eval(input()))

ans=10**15

for i in range(1,int(n**0.5)+1):

  if n%i==0:

    a=i

    b=n//i

    

    ans=min(ans,F(a,b))



print(ans)
# n 10**10
# sqrtn 10**5
ans = 10**6
n = int(eval(input()))
for i in range(1, int(n**0.5) + 1):
    if n % i == 0:
        ans = min(len(str(n // i)), ans)
print(ans)

def F(a, b):
    return max(len(str(a)), len(str(b)))


n = int(eval(input()))
ans = 10**15
for i in range(1, int(n**0.5) + 1):
    if n % i == 0:
        a = i
        b = n // i
        ans = min(ans, F(a, b))
print(ans)

-# n 10**10 -# sqrtn 10**5 -ans = 10**6 +def F(a, b): +    return max(len(str(a)), len(str(b))) + + +ans = 10**15 -        ans = min(len(str(n // i)), ans) +        a = i +        b = n // i +        ans = min(ans, F(a, b))