n = int(eval(input()))

ans = 11

for i in range(1, int(-(-n**.5//1))+1):

    x, r = divmod(n, i)

    if r == 0:

        ans = min(ans, max([len(str(x)) for x in (i, x)]))

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

INF = 10**18

ans = INF





def F(a, b):

    return max(len(str(a)), len(str(b)))





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

    if n % i == 0:

        x = F(i, n//i)

        if x < ans:

            ans = x

print(ans)
n = int(eval(input()))
ans = 11
for i in range(1, int(-(-(n**0.5) // 1)) + 1):
    x, r = divmod(n, i)
    if r == 0:
        ans = min(ans, max([len(str(x)) for x in (i, x)]))
print(ans)

n = int(eval(input()))
INF = 10**18
ans = INF


def F(a, b):
    return max(len(str(a)), len(str(b)))


for i in range(1, int(n**0.5) + 1):
    if n % i == 0:
        x = F(i, n // i)
        if x < ans:
            ans = x
print(ans)

-ans = 11 -for i in range(1, int(-(-(n**0.5) // 1)) + 1): -    x, r = divmod(n, i) -    if r == 0: -        ans = min(ans, max([len(str(x)) for x in (i, x)])) +INF = 10**18 +ans = INF + + +def F(a, b): +    return max(len(str(a)), len(str(b))) + + +for i in range(1, int(n**0.5) + 1): +    if n % i == 0: +        x = F(i, n // i) +        if x < ans: +            ans = x