num = int(eval(input()))



digits = len(str(num))



ans = digits



for i in range(1,10 ** (digits // 2 + 1)):

    if num % i == 0:

        target = max(len(str(i)), len(str(num//i)))

        if ans >= target:

            ans = target

        else:

            print(ans)

            exit()

print(ans)
n=int(eval(input()))

x=int(n**0.5)

for i in range(x):

    if n%(x-i)==0:

        print((len(str(n//(x-i)))))

        break
num = int(eval(input()))
digits = len(str(num))
ans = digits
for i in range(1, 10 ** (digits // 2 + 1)):
    if num % i == 0:
        target = max(len(str(i)), len(str(num // i)))
        if ans >= target:
            ans = target
        else:
            print(ans)
            exit()
print(ans)

n = int(eval(input()))
x = int(n**0.5)
for i in range(x):
    if n % (x - i) == 0:
        print((len(str(n // (x - i)))))
        break

-num = int(eval(input())) -digits = len(str(num)) -ans = digits -for i in range(1, 10 ** (digits // 2 + 1)): -    if num % i == 0: -        target = max(len(str(i)), len(str(num // i))) -        if ans >= target: -            ans = target -        else: -            print(ans) -            exit() -print(ans) +n = int(eval(input())) +x = int(n**0.5) +for i in range(x): +    if n % (x - i) == 0: +        print((len(str(n // (x - i))))) +        break