N = int(eval(input()))



a = 1

i = 2

while i * i <= N:

    if N % i == 0:

        a = i

    i += 1



b = N // a

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


N = int(eval(input()))



ans = 11

a = 1

i = 1

while i * i <= N:

    if N % i == 0:

        a = i

        b = N//a

        ans = min(ans, len(str((max(a,b)))))

    i += 1



print(ans)
N = int(eval(input()))
a = 1
i = 2
while i * i <= N:
    if N % i == 0:
        a = i
    i += 1
b = N // a
print((max(len(str(a)), len(str(b)))))

N = int(eval(input()))
ans = 11
a = 1
i = 1
while i * i <= N:
    if N % i == 0:
        a = i
        b = N // a
        ans = min(ans, len(str((max(a, b)))))
    i += 1
print(ans)

+ans = 11 -i = 2 +i = 1 +        b = N // a +        ans = min(ans, len(str((max(a, b))))) -b = N // a -print((max(len(str(a)), len(str(b))))) +print(ans)