n = int(eval(input()))

ans = len(str(n))

import numpy



for i in range(2, int(numpy.sqrt(n))+1):

    if n % i == 0:

        ABmax = max(len(str(i)), len(str(n//i)))

        ans = min (ans, ABmax)



print(ans)
from math import sqrt



N = int(eval(input()))

ans = float('inf')



for A in range(1, int(sqrt(N))+1):

    if N % A == 0:

        B = N // A

        ans = min(ans, max(len(str(A)), len(str(B))))



print(ans)
n = int(eval(input()))
ans = len(str(n))
import numpy

for i in range(2, int(numpy.sqrt(n)) + 1):
    if n % i == 0:
        ABmax = max(len(str(i)), len(str(n // i)))
        ans = min(ans, ABmax)
print(ans)

from math import sqrt

N = int(eval(input()))
ans = float("inf")
for A in range(1, int(sqrt(N)) + 1):
    if N % A == 0:
        B = N // A
        ans = min(ans, max(len(str(A)), len(str(B))))
print(ans)

-n = int(eval(input())) -ans = len(str(n)) -import numpy +from math import sqrt -for i in range(2, int(numpy.sqrt(n)) + 1): -    if n % i == 0: -        ABmax = max(len(str(i)), len(str(n // i))) -        ans = min(ans, ABmax) +N = int(eval(input())) +ans = float("inf") +for A in range(1, int(sqrt(N)) + 1): +    if N % A == 0: +        B = N // A +        ans = min(ans, max(len(str(A)), len(str(B))))