def main():

    N = int(eval(input()))



    def trial_division(n):

        divs = []

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

            if n % i == 0 and i != n//i:

                divs.append((i, n//i))

            elif n % i == 0 and i == n//i:

                divs.append((i, i))

        return divs

    ans = 10**13

    divs = trial_division(N)

    for a, b in divs:

        ans = min(ans, max(len(str(a)), len(str(b))))

    print(ans)





if __name__ == '__main__':

    main()

def main():

    N = int(eval(input()))



    def enum_divisors(n):

        ans = 10**12

        for i in range(1, n+1):

            if i*i > n:

                break

            if n % i == 0:

                v1 = str(i)

                v2 = str(n//i)

                ans = min(ans, max(len(v1), len(v2)))

        return ans



    print((enum_divisors(N)))





if __name__ == '__main__':

    main()

def main():
    N = int(eval(input()))

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

    ans = 10**13
    divs = trial_division(N)
    for a, b in divs:
        ans = min(ans, max(len(str(a)), len(str(b))))
    print(ans)


if __name__ == "__main__":
    main()

def main():
    N = int(eval(input()))

    def enum_divisors(n):
        ans = 10**12
        for i in range(1, n + 1):
            if i * i > n:
                break
            if n % i == 0:
                v1 = str(i)
                v2 = str(n // i)
                ans = min(ans, max(len(v1), len(v2)))
        return ans

    print((enum_divisors(N)))


if __name__ == "__main__":
    main()

-    def trial_division(n): -        divs = [] -        for i in range(1, int(n**0.5) + 1): -            if n % i == 0 and i != n // i: -                divs.append((i, n // i)) -            elif n % i == 0 and i == n // i: -                divs.append((i, i)) -        return divs +    def enum_divisors(n): +        ans = 10**12 +        for i in range(1, n + 1): +            if i * i > n: +                break +            if n % i == 0: +                v1 = str(i) +                v2 = str(n // i) +                ans = min(ans, max(len(v1), len(v2))) +        return ans -    ans = 10**13 -    divs = trial_division(N) -    for a, b in divs: -        ans = min(ans, max(len(str(a)), len(str(b)))) -    print(ans) +    print((enum_divisors(N)))