N = int(eval(input()))

def is_square(n):

    m = int(n**.5)

    return True if abs(m*m - n) < 1e-6 else False

divs = []

f = False

if is_square(N):

    divs = [int(N**.5)]*2

    f = True

for i in range(int(N**.5),0,-1):

    if f: break

    if N % i == 0: divs += [i, N//i]

    if len(divs) >= 2: break

print((max([len(str(x)) for x in divs])))
n = int(eval(input()))

sn = int(n**.5)

if (sn)*(sn)==n:

    print((len(str(sn))))

    quit()



divisors = []

c = 0

for i in range(int(n**.5)+1, 0, -1):

    if n % i == 0:

        divisors.append(i)

        c += 1

        if i != n // i:

            divisors.append(n//i)

            c += 1

    if c >= 2:

        break



print((len(str(max(divisors)))))
N = int(eval(input()))


def is_square(n):
    m = int(n**0.5)
    return True if abs(m * m - n) < 1e-6 else False


divs = []
f = False
if is_square(N):
    divs = [int(N**0.5)] * 2
    f = True
for i in range(int(N**0.5), 0, -1):
    if f:
        break
    if N % i == 0:
        divs += [i, N // i]
    if len(divs) >= 2:
        break
print((max([len(str(x)) for x in divs])))

n = int(eval(input()))
sn = int(n**0.5)
if (sn) * (sn) == n:
    print((len(str(sn))))
    quit()
divisors = []
c = 0
for i in range(int(n**0.5) + 1, 0, -1):
    if n % i == 0:
        divisors.append(i)
        c += 1
        if i != n // i:
            divisors.append(n // i)
            c += 1
    if c >= 2:
        break
print((len(str(max(divisors)))))

-N = int(eval(input())) - - -def is_square(n): -    m = int(n**0.5) -    return True if abs(m * m - n) < 1e-6 else False - - -divs = [] -f = False -if is_square(N): -    divs = [int(N**0.5)] * 2 -    f = True -for i in range(int(N**0.5), 0, -1): -    if f: +n = int(eval(input())) +sn = int(n**0.5) +if (sn) * (sn) == n: +    print((len(str(sn)))) +    quit() +divisors = [] +c = 0 +for i in range(int(n**0.5) + 1, 0, -1): +    if n % i == 0: +        divisors.append(i) +        c += 1 +        if i != n // i: +            divisors.append(n // i) +            c += 1 +    if c >= 2: -    if N % i == 0: -        divs += [i, N // i] -    if len(divs) >= 2: -        break -print((max([len(str(x)) for x in divs]))) +print((len(str(max(divisors)))))