n = int(eval(input()))

jud = []

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

    x = n // i

    if x * i == n:

        jud.append(len(str(x)))

print((min(jud)))
def yaku(n):

    yalu_l = []

    for j in range(1, int(n ** 0.5) + 1):

        if n % j == 0:

            yalu_l.append([n // j, j])

        else:

            continue

    return yalu_l





ans = 10 ** 9



n = int(eval(input()))



for i in yaku(n):

    p = len(str(i[0]))

    q = len(str(i[1]))

    ans = min(max(p, q), ans)



print(ans)
n = int(eval(input()))
jud = []
for i in range(1, int(n**0.5) + 1):
    x = n // i
    if x * i == n:
        jud.append(len(str(x)))
print((min(jud)))

def yaku(n):
    yalu_l = []
    for j in range(1, int(n**0.5) + 1):
        if n % j == 0:
            yalu_l.append([n // j, j])
        else:
            continue
    return yalu_l


ans = 10**9
n = int(eval(input()))
for i in yaku(n):
    p = len(str(i[0]))
    q = len(str(i[1]))
    ans = min(max(p, q), ans)
print(ans)

+def yaku(n): +    yalu_l = [] +    for j in range(1, int(n**0.5) + 1): +        if n % j == 0: +            yalu_l.append([n // j, j]) +        else: +            continue +    return yalu_l + + +ans = 10**9 -jud = [] -for i in range(1, int(n**0.5) + 1): -    x = n // i -    if x * i == n: -        jud.append(len(str(x))) -print((min(jud))) +for i in yaku(n): +    p = len(str(i[0])) +    q = len(str(i[1])) +    ans = min(max(p, q), ans) +print(ans)