from math import sqrt

N = int(eval(input()))

root_N = int(sqrt(N)) + 1





def F(a, b):

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





min_F = 10**6

for a in range(1, root_N + 1):

    if N % a == 0:

        b = N // a

        min_F = min(min_F, F(a, b))

print(min_F)

def make_divisors(n):

    divisors = []

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

        if n % i == 0:

            divisors.append(i)

            if i != n // i:

                divisors.append(n // i)



    divisors.sort()

    return divisors





def F(a, b):

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





N = int(eval(input()))

min_num = 10**9

for divisor in make_divisors(N):

    min_num = min(min_num, F(divisor, N // divisor))

print(min_num)

from math import sqrt

N = int(eval(input()))
root_N = int(sqrt(N)) + 1


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


min_F = 10**6
for a in range(1, root_N + 1):
    if N % a == 0:
        b = N // a
        min_F = min(min_F, F(a, b))
print(min_F)

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5) + 1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n // i)
    divisors.sort()
    return divisors


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


N = int(eval(input()))
min_num = 10**9
for divisor in make_divisors(N):
    min_num = min(min_num, F(divisor, N // divisor))
print(min_num)

-from math import sqrt - -N = int(eval(input())) -root_N = int(sqrt(N)) + 1 +def make_divisors(n): +    divisors = [] +    for i in range(1, int(n**0.5) + 1): +        if n % i == 0: +            divisors.append(i) +            if i != n // i: +                divisors.append(n // i) +    divisors.sort() +    return divisors -min_F = 10**6 -for a in range(1, root_N + 1): -    if N % a == 0: -        b = N // a -        min_F = min(min_F, F(a, b)) -print(min_F) +N = int(eval(input())) +min_num = 10**9 +for divisor in make_divisors(N): +    min_num = min(min_num, F(divisor, N // divisor)) +print(min_num)