def F(a, b):

    count = 0

    c = max(a, b)

    while c >= 10:

        c = c / 10

        count += 1

    return count+1



N = int(eval(input()))

minimum = 15

for num in range(1,int(N/(10**5))+10**5+1):

    if N % num == 0:

        minimum = min(minimum, F(num, N/num))

print(minimum)
def F(a, b):

    count = 0

    c = max(a, b)

    while c >= 10:

        c = c / 10

        count += 1

    return count+1

 

N = int(eval(input()))

minimum = 15

for num in range(1,10**5+1):

    if N % num == 0:

        minimum = min(minimum, F(num, N/num))

print(minimum)
def F(a, b):
    count = 0
    c = max(a, b)
    while c >= 10:
        c = c / 10
        count += 1
    return count + 1


N = int(eval(input()))
minimum = 15
for num in range(1, int(N / (10**5)) + 10**5 + 1):
    if N % num == 0:
        minimum = min(minimum, F(num, N / num))
print(minimum)

def F(a, b):
    count = 0
    c = max(a, b)
    while c >= 10:
        c = c / 10
        count += 1
    return count + 1


N = int(eval(input()))
minimum = 15
for num in range(1, 10**5 + 1):
    if N % num == 0:
        minimum = min(minimum, F(num, N / num))
print(minimum)

-for num in range(1, int(N / (10**5)) + 10**5 + 1): +for num in range(1, 10**5 + 1):