from math import sqrt

n = int(eval(input()))

m = int(sqrt(n))

lst = []

for i in range(2, m + 1):

    if n % i == 0:

        j = 0

        while True:

            if n % i == 0:

                n //= i

                j += 1

            else:

                for k in range(j):

                    lst.append(i)

                break



lst.append(n)



ans = float("INF")

for i in range(2 ** len(lst)):

    num1 = 1

    num2 = 1

    for j in range(len(lst)):

        if (i >> j) & 1:

            num1 *= lst[j]

        else:

            num2 *= lst[j]

    ans = min(ans, max(len(str(num1)), len(str(num2))))

    

print(ans)

            

            

n = int(eval(input()))

i = 1

ans = n

lst = []

while i * i <= n:

    if n % i == 0:

        ans = n // i

    i += 1



print((len(str(ans))))

from math import sqrt

n = int(eval(input()))
m = int(sqrt(n))
lst = []
for i in range(2, m + 1):
    if n % i == 0:
        j = 0
        while True:
            if n % i == 0:
                n //= i
                j += 1
            else:
                for k in range(j):
                    lst.append(i)
                break
lst.append(n)
ans = float("INF")
for i in range(2 ** len(lst)):
    num1 = 1
    num2 = 1
    for j in range(len(lst)):
        if (i >> j) & 1:
            num1 *= lst[j]
        else:
            num2 *= lst[j]
    ans = min(ans, max(len(str(num1)), len(str(num2))))
print(ans)

n = int(eval(input()))
i = 1
ans = n
lst = []
while i * i <= n:
    if n % i == 0:
        ans = n // i
    i += 1
print((len(str(ans))))

-from math import sqrt - -m = int(sqrt(n)) +i = 1 +ans = n -for i in range(2, m + 1): +while i * i <= n: -        j = 0 -        while True: -            if n % i == 0: -                n //= i -                j += 1 -            else: -                for k in range(j): -                    lst.append(i) -                break -lst.append(n) -ans = float("INF") -for i in range(2 ** len(lst)): -    num1 = 1 -    num2 = 1 -    for j in range(len(lst)): -        if (i >> j) & 1: -            num1 *= lst[j] -        else: -            num2 *= lst[j] -    ans = min(ans, max(len(str(num1)), len(str(num2)))) -print(ans) +        ans = n // i +    i += 1 +print((len(str(ans))))