def f(a, b):

    tmpA, tmpB = a, b

    countA = 0

    while tmpA:

        tmpA //= 10

        countA += 1

    digitA = countA



    countB = 0

    while tmpB:

        tmpB //= 10

        countB += 1

    digitB = countB



    return max(digitA, digitB)



n = int(eval(input()))



ans = 11

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

    b = n / a

    if f(a, b) < ans and n % a == 0:

        ans = f(a, b)



print(ans)

def f(a, b):

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



n = int(eval(input()))



ans = 11

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

    b = n // a 

    if n % a == 0 and f(a, b) < ans:

        ans = f(a, b)



print(ans)
def f(a, b):
    tmpA, tmpB = a, b
    countA = 0
    while tmpA:
        tmpA //= 10
        countA += 1
    digitA = countA
    countB = 0
    while tmpB:
        tmpB //= 10
        countB += 1
    digitB = countB
    return max(digitA, digitB)


n = int(eval(input()))
ans = 11
for a in range(1, int(n**0.5) + 1):
    b = n / a
    if f(a, b) < ans and n % a == 0:
        ans = f(a, b)
print(ans)

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


n = int(eval(input()))
ans = 11
for a in range(1, int(n**0.5) + 1):
    b = n // a
    if n % a == 0 and f(a, b) < ans:
        ans = f(a, b)
print(ans)

-    tmpA, tmpB = a, b -    countA = 0 -    while tmpA: -        tmpA //= 10 -        countA += 1 -    digitA = countA -    countB = 0 -    while tmpB: -        tmpB //= 10 -        countB += 1 -    digitB = countB -    return max(digitA, digitB) +    return max(len(str(a)), len(str(b))) -    b = n / a -    if f(a, b) < ans and n % a == 0: +    b = n // a +    if n % a == 0 and f(a, b) < ans: