N=int(eval(input()))

ans=10



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

    if N/A==int(N/A):

        ans=min(ans,len(str(int(N/A))))



print(ans)
N = int(eval(input()))





def F(A, B):

    return max(len(str(A)), len(str(B)))





ans = 10**30

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

    if N % i == 0:

        ans = min(ans, F(i, N//i))

print(ans)

N = int(eval(input()))
ans = 10
for A in range(1, int(N**0.5) + 1):
    if N / A == int(N / A):
        ans = min(ans, len(str(int(N / A))))
print(ans)

N = int(eval(input()))


def F(A, B):
    return max(len(str(A)), len(str(B)))


ans = 10**30
for i in range(1, int(N**0.5) + 1):
    if N % i == 0:
        ans = min(ans, F(i, N // i))
print(ans)

-ans = 10 -for A in range(1, int(N**0.5) + 1): -    if N / A == int(N / A): -        ans = min(ans, len(str(int(N / A)))) + + +def F(A, B): +    return max(len(str(A)), len(str(B))) + + +ans = 10**30 +for i in range(1, int(N**0.5) + 1): +    if N % i == 0: +        ans = min(ans, F(i, N // i))