import math

N = int(eval(input()))

ans = float('Inf')

sq = int(math.sqrt(N)) + 1

for i in range(1, sq):

    if N % i == 0:

        a = len(str(i))

        b = len(str(N // i))

        if a > b:

            num = a

        else:

            num = b

        if ans > num:

            ans = num

print(ans)
import math

N = int(eval(input()))

res = float('Inf')

M = int(math.sqrt(N))

for A in range(1, M+1):

    if N % A == 0:

        B = int(N / A)

        a = len(str(A))

        b = len(str(B))

        c = max(a, b)

        if res > c:

            res = c

print(res)
import math

N = int(eval(input()))
ans = float("Inf")
sq = int(math.sqrt(N)) + 1
for i in range(1, sq):
    if N % i == 0:
        a = len(str(i))
        b = len(str(N // i))
        if a > b:
            num = a
        else:
            num = b
        if ans > num:
            ans = num
print(ans)

import math

N = int(eval(input()))
res = float("Inf")
M = int(math.sqrt(N))
for A in range(1, M + 1):
    if N % A == 0:
        B = int(N / A)
        a = len(str(A))
        b = len(str(B))
        c = max(a, b)
        if res > c:
            res = c
print(res)

-ans = float("Inf") -sq = int(math.sqrt(N)) + 1 -for i in range(1, sq): -    if N % i == 0: -        a = len(str(i)) -        b = len(str(N // i)) -        if a > b: -            num = a -        else: -            num = b -        if ans > num: -            ans = num -print(ans) +res = float("Inf") +M = int(math.sqrt(N)) +for A in range(1, M + 1): +    if N % A == 0: +        B = int(N / A) +        a = len(str(A)) +        b = len(str(B)) +        c = max(a, b) +        if res > c: +            res = c +print(res)