N = int(eval(input()))

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

    if N % (int(N**0.5) - i) == 0:

        A = (int(N**0.5) - i)

        B = N//(int(N**0.5) - i)

        break

print((len(str(B))))
n = int(eval(input()))

ans = 10**100

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

    if n%a == 0:

        b = n//a

        f = len(str(b))

        ans = min(ans,f)

print(ans)
N = int(eval(input()))
for i in range(0, int(N**0.5)):
    if N % (int(N**0.5) - i) == 0:
        A = int(N**0.5) - i
        B = N // (int(N**0.5) - i)
        break
print((len(str(B))))

n = int(eval(input()))
ans = 10**100
for a in range(1, int(n ** (0.5)) + 2):
    if n % a == 0:
        b = n // a
        f = len(str(b))
        ans = min(ans, f)
print(ans)

-N = int(eval(input())) -for i in range(0, int(N**0.5)): -    if N % (int(N**0.5) - i) == 0: -        A = int(N**0.5) - i -        B = N // (int(N**0.5) - i) -        break -print((len(str(B)))) +n = int(eval(input())) +ans = 10**100 +for a in range(1, int(n ** (0.5)) + 2): +    if n % a == 0: +        b = n // a +        f = len(str(b)) +        ans = min(ans, f) +print(ans)