def main():

    def f(a, b):

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

    def make_divisors(n):

        divisors = []

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

            if n % i == 0:

                divisors.append(i)

                if i != n // i:

                    divisors.append(n//i)

        return divisors

    n = int(eval(input()))

    divisors = make_divisors(n)

    ans = float('inf')

    for a in divisors:

        b = n // a

        ans = min(ans, f(a, b))

    print(ans)





if __name__ == '__main__':

    main()

def f(a, b):

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

def main():

    n = int(eval(input()))

    ans = 100

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

        if n % i == 0:

            ans = min(ans, f(i, n // i))

    print(ans)



if __name__ == '__main__':

    main()

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

    def make_divisors(n):
        divisors = []
        for i in range(1, int(n**0.5) + 1):
            if n % i == 0:
                divisors.append(i)
                if i != n // i:
                    divisors.append(n // i)
        return divisors

    n = int(eval(input()))
    divisors = make_divisors(n)
    ans = float("inf")
    for a in divisors:
        b = n // a
        ans = min(ans, f(a, b))
    print(ans)


if __name__ == "__main__":
    main()

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


def main():
    n = int(eval(input()))
    ans = 100
    for i in range(1, int(n**0.5 + 0.5) + 1):
        if n % i == 0:
            ans = min(ans, f(i, n // i))
    print(ans)


if __name__ == "__main__":
    main()

+def f(a, b): +    return len(str(max(a, b))) + + -    def f(a, b): -        return max(len(str(a)), len(str(b))) - -    def make_divisors(n): -        divisors = [] -        for i in range(1, int(n**0.5) + 1): -            if n % i == 0: -                divisors.append(i) -                if i != n // i: -                    divisors.append(n // i) -        return divisors - -    divisors = make_divisors(n) -    ans = float("inf") -    for a in divisors: -        b = n // a -        ans = min(ans, f(a, b)) +    ans = 100 +    for i in range(1, int(n**0.5 + 0.5) + 1): +        if n % i == 0: +            ans = min(ans, f(i, n // i))