import sys

input = sys.stdin.readline

sys.setrecursionlimit(10 ** 7)



n = int(eval(input()))



i = 1

ab = set()

while i ** 2 <= n:

    if n % i == 0:

        ab.add((i, n // i))

    i += 1



def digit(n):

    ans = 0

    while n > 0:

        ans += 1

        n //= 10

    return ans



ans = 10 ** 10

for a, b in ab:

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



print(ans)

import sys

input = sys.stdin.readline

sys.setrecursionlimit(10 ** 7)



n = int(eval(input()))



def digit(n):

    l = 0

    while n:

        l += 1

        n //= 10

    return l



ans = 100

i = 1

while i ** 2 <= n:

    if n % i == 0:

        #ans = min(ans, max(len(str(i)), len(str(n // i))))

        ans = min(ans, max(digit(i), digit(n // i)))

    i += 1

print(ans)

import sys

input = sys.stdin.readline
sys.setrecursionlimit(10**7)
n = int(eval(input()))
i = 1
ab = set()
while i**2 <= n:
    if n % i == 0:
        ab.add((i, n // i))
    i += 1


def digit(n):
    ans = 0
    while n > 0:
        ans += 1
        n //= 10
    return ans


ans = 10**10
for a, b in ab:
    ans = min(ans, max(digit(a), digit(b)))
print(ans)

import sys

input = sys.stdin.readline
sys.setrecursionlimit(10**7)
n = int(eval(input()))


def digit(n):
    l = 0
    while n:
        l += 1
        n //= 10
    return l


ans = 100
i = 1
while i**2 <= n:
    if n % i == 0:
        # ans = min(ans, max(len(str(i)), len(str(n // i))))
        ans = min(ans, max(digit(i), digit(n // i)))
    i += 1
print(ans)

-i = 1 -ab = set() -while i**2 <= n: -    if n % i == 0: -        ab.add((i, n // i)) -    i += 1 -    ans = 0 -    while n > 0: -        ans += 1 +    l = 0 +    while n: +        l += 1 -    return ans +    return l -ans = 10**10 -for a, b in ab: -    ans = min(ans, max(digit(a), digit(b))) +ans = 100 +i = 1 +while i**2 <= n: +    if n % i == 0: +        # ans = min(ans, max(len(str(i)), len(str(n // i)))) +        ans = min(ans, max(digit(i), digit(n // i))) +    i += 1