def make_divisors(n):

    ans = float("inf")

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

        if n % i == 0:

            div1 = i

            div2 = n // i

            res = max(len(str(div1)), len(str(div2)))

        ans = min(ans, res)

    return ans



if __name__ == '__main__':

    n = int(eval(input()))

    print((make_divisors(n)))
import sys



sys.setrecursionlimit(10 ** 7)

f_inf = float('inf')

mod = 10 ** 9 + 7





def resolve():

    n = int(eval(input()))



    def f(a, b):

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



    res = f_inf

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

        if n % a == 0:

            b = n // a

            t = f(a, b)

            res = min(res, t)



    print(res)





if __name__ == '__main__':

    resolve()

def make_divisors(n):
    ans = float("inf")
    for i in range(1, int(n**0.5) + 1):
        if n % i == 0:
            div1 = i
            div2 = n // i
            res = max(len(str(div1)), len(str(div2)))
        ans = min(ans, res)
    return ans


if __name__ == "__main__":
    n = int(eval(input()))
    print((make_divisors(n)))

import sys

sys.setrecursionlimit(10**7)
f_inf = float("inf")
mod = 10**9 + 7


def resolve():
    n = int(eval(input()))

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

    res = f_inf
    for a in range(1, int(pow(n, 0.5)) + 1):
        if n % a == 0:
            b = n // a
            t = f(a, b)
            res = min(res, t)
    print(res)


if __name__ == "__main__":
    resolve()

-def make_divisors(n): -    ans = float("inf") -    for i in range(1, int(n**0.5) + 1): -        if n % i == 0: -            div1 = i -            div2 = n // i -            res = max(len(str(div1)), len(str(div2))) -        ans = min(ans, res) -    return ans +import sys + +sys.setrecursionlimit(10**7) +f_inf = float("inf") +mod = 10**9 + 7 + + +def resolve(): +    n = int(eval(input())) + +    def f(a, b): +        return max(len(str(a)), len(str(b))) + +    res = f_inf +    for a in range(1, int(pow(n, 0.5)) + 1): +        if n % a == 0: +            b = n // a +            t = f(a, b) +            res = min(res, t) +    print(res) -    n = int(eval(input())) -    print((make_divisors(n))) +    resolve()