def main():

    n = int(eval(input()))

    m = 1

    k = int(n ** 0.5)



    ans = len(str(n))

    for i in range(k + 1, 0, -1):

        if n % i == 0:

            n = n // i

            m *= i

            tmp = max(len(str(m)), len(str(n)))

            ans = min(ans, tmp)



    print(ans)





if __name__ == '__main__':

    main()

def main():

    n = int(eval(input()))

    m = 1

    k = int(n ** 0.5)



    ans = len(str(n))

    for i in range(k + 1, 0, -1):

        if n % i == 0:

            n = n // i

            m *= i

            tmp = max(len(str(m)), len(str(n)))

            ans = min(ans, tmp)

            break



    print(ans)





if __name__ == '__main__':

    main()

def main():
    n = int(eval(input()))
    m = 1
    k = int(n**0.5)
    ans = len(str(n))
    for i in range(k + 1, 0, -1):
        if n % i == 0:
            n = n // i
            m *= i
            tmp = max(len(str(m)), len(str(n)))
            ans = min(ans, tmp)
    print(ans)


if __name__ == "__main__":
    main()

def main():
    n = int(eval(input()))
    m = 1
    k = int(n**0.5)
    ans = len(str(n))
    for i in range(k + 1, 0, -1):
        if n % i == 0:
            n = n // i
            m *= i
            tmp = max(len(str(m)), len(str(n)))
            ans = min(ans, tmp)
            break
    print(ans)


if __name__ == "__main__":
    main()

+            break