def calc_digit(n):

    d = 0

    while n > 0:

        d += 1

        n //= 10

    return d





n = int(eval(input()))

temp = -1

ans = 12

i = 1

while i * i <= n:

    if n % i == 0:

        temp = max(calc_digit(i), calc_digit(n // i))

    ans = min(temp,ans)

    i += 1

print(ans)

def count_digit(n):

    d = 0

    while n > 0:

        n //= 10

        d += 1

    return d





n = int(eval(input()))



i = 1

ans = 11

while i * i <= n:

    if n % i == 0:

        temp = max(count_digit(i), count_digit(n // i))

        if ans > temp:

            ans = temp

    i += 1

print(ans)
def calc_digit(n):
    d = 0
    while n > 0:
        d += 1
        n //= 10
    return d


n = int(eval(input()))
temp = -1
ans = 12
i = 1
while i * i <= n:
    if n % i == 0:
        temp = max(calc_digit(i), calc_digit(n // i))
    ans = min(temp, ans)
    i += 1
print(ans)

def count_digit(n):
    d = 0
    while n > 0:
        n //= 10
        d += 1
    return d


n = int(eval(input()))
i = 1
ans = 11
while i * i <= n:
    if n % i == 0:
        temp = max(count_digit(i), count_digit(n // i))
        if ans > temp:
            ans = temp
    i += 1
print(ans)

-def calc_digit(n): +def count_digit(n): +        n //= 10 -        n //= 10 -temp = -1 -ans = 12 +ans = 11 -        temp = max(calc_digit(i), calc_digit(n // i)) -    ans = min(temp, ans) +        temp = max(count_digit(i), count_digit(n // i)) +        if ans > temp: +            ans = temp