n=int(eval(input()))

if n==6983776800:print((5));exit()



def prime_factorize(n):

    a=[]

    while n%2==0:

        a.append(2)

        n //=2

    f=3

    while f**2<=n:

        if n%f==0:

            a.append(f)

            n //=f

        else:f +=2

    if n!=1:a.append(n)

    return a





F=prime_factorize(n)

A,B=1,1

for i in F[::-1]:

    if A<=B:A *=i

    else:B *=i

print((max(len(str(A)),len(str(B)))))
ans=100

n=int(eval(input()))

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

    if n%i==0:

        a,b=str(i),str(n//i)

        ans=min(ans,max(len(a),len(b)))

print(ans)
n = int(eval(input()))
if n == 6983776800:
    print((5))
    exit()


def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f**2 <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


F = prime_factorize(n)
A, B = 1, 1
for i in F[::-1]:
    if A <= B:
        A *= i
    else:
        B *= i
print((max(len(str(A)), len(str(B)))))

ans = 100
n = int(eval(input()))
for i in range(1, int(n**0.5) + 1):
    if n % i == 0:
        a, b = str(i), str(n // i)
        ans = min(ans, max(len(a), len(b)))
print(ans)

+ans = 100 -if n == 6983776800: -    print((5)) -    exit() - - -def prime_factorize(n): -    a = [] -    while n % 2 == 0: -        a.append(2) -        n //= 2 -    f = 3 -    while f**2 <= n: -        if n % f == 0: -            a.append(f) -            n //= f -        else: -            f += 2 -    if n != 1: -        a.append(n) -    return a - - -F = prime_factorize(n) -A, B = 1, 1 -for i in F[::-1]: -    if A <= B: -        A *= i -    else: -        B *= i -print((max(len(str(A)), len(str(B))))) +for i in range(1, int(n**0.5) + 1): +    if n % i == 0: +        a, b = str(i), str(n // i) +        ans = min(ans, max(len(a), len(b))) +print(ans)