N = int(eval(input()))



def F(a, b):

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



ans = 100

i = 1

while i <= N**0.5:

    if N%i == 0:

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

    i += 1

    

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



def f(a, b):

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



ans = N

i = 1

while i <= N**0.5:

    if N%i == 0:

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

    i += 1



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


def F(a, b):
    return max(len(str(a)), len(str(b)))


ans = 100
i = 1
while i <= N**0.5:
    if N % i == 0:
        ans = min(ans, F(i, N // i))
    i += 1
print(ans)

N = int(eval(input()))


def f(a, b):
    return max(len(str(a)), len(str(b)))


ans = N
i = 1
while i <= N**0.5:
    if N % i == 0:
        ans = min(ans, f(i, N // i))
    i += 1
print(ans)

-def F(a, b): +def f(a, b): -ans = 100 +ans = N -        ans = min(ans, F(i, N // i)) +        ans = min(ans, f(i, N // i))