n = int(eval(input()))

tmp = n

for x in range(1, n+1):

    y = n//x

    if x > y:

        break

    if n % x == 0:

        tmp = y

ans = len(str(tmp))

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

answer = 10**10

M = int(N**0.5)+1



for a in range(1,M):

    if N%a==0:

        b = N//a

        F = max(len(str(a)),len(str(b)))

        answer = min(answer,F)

print(answer)
n = int(eval(input()))
tmp = n
for x in range(1, n + 1):
    y = n // x
    if x > y:
        break
    if n % x == 0:
        tmp = y
ans = len(str(tmp))
print(ans)

N = int(eval(input()))
answer = 10**10
M = int(N**0.5) + 1
for a in range(1, M):
    if N % a == 0:
        b = N // a
        F = max(len(str(a)), len(str(b)))
        answer = min(answer, F)
print(answer)

-n = int(eval(input())) -tmp = n -for x in range(1, n + 1): -    y = n // x -    if x > y: -        break -    if n % x == 0: -        tmp = y -ans = len(str(tmp)) -print(ans) +N = int(eval(input())) +answer = 10**10 +M = int(N**0.5) + 1 +for a in range(1, M): +    if N % a == 0: +        b = N // a +        F = max(len(str(a)), len(str(b))) +        answer = min(answer, F) +print(answer)