from math import sqrt



n = int(eval(input()))



for a in range(int(sqrt(n))+1, 0, -1):

    if n % a == 0:

        b = n // a

        res = max(list(map(len, list(map(str, [a, b])))))

        break



print(res)

n = int(eval(input()))



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

    if n % a == 0:

        b = n // a

        res = max(list(map(len, list(map(str, [a, b])))))

        break



print(res)

from math import sqrt

n = int(eval(input()))
for a in range(int(sqrt(n)) + 1, 0, -1):
    if n % a == 0:
        b = n // a
        res = max(list(map(len, list(map(str, [a, b])))))
        break
print(res)

n = int(eval(input()))
for a in range(int(n**0.5) + 1, 0, -1):
    if n % a == 0:
        b = n // a
        res = max(list(map(len, list(map(str, [a, b])))))
        break
print(res)

-from math import sqrt - -for a in range(int(sqrt(n)) + 1, 0, -1): +for a in range(int(n**0.5) + 1, 0, -1):