from math import sqrt

def solve():

    N = int(eval(input()))



    mn = float('inf')

    for A in range(int(sqrt(N))+1,0,-1):

        if N % A == 0:

            B = N // A

            mn = min(f(A,B), mn)



    print(mn)



def f(A,B):

    return max(len(str(A)), len(str(B)))

    

if __name__ == '__main__':

    solve()
from math import sqrt

def solve():

    N = int(eval(input()))

    ans = float('inf')

    for A in range(1,int(sqrt(N))+1):

        if N % A == 0:

            ans = min(ans, len(str(N//A)))

    

    print(ans)



if __name__ == '__main__':

    solve()
from math import sqrt


def solve():
    N = int(eval(input()))
    mn = float("inf")
    for A in range(int(sqrt(N)) + 1, 0, -1):
        if N % A == 0:
            B = N // A
            mn = min(f(A, B), mn)
    print(mn)


def f(A, B):
    return max(len(str(A)), len(str(B)))


if __name__ == "__main__":
    solve()

from math import sqrt


def solve():
    N = int(eval(input()))
    ans = float("inf")
    for A in range(1, int(sqrt(N)) + 1):
        if N % A == 0:
            ans = min(ans, len(str(N // A)))
    print(ans)


if __name__ == "__main__":
    solve()

-    mn = float("inf") -    for A in range(int(sqrt(N)) + 1, 0, -1): +    ans = float("inf") +    for A in range(1, int(sqrt(N)) + 1): -            B = N // A -            mn = min(f(A, B), mn) -    print(mn) - - -def f(A, B): -    return max(len(str(A)), len(str(B))) +            ans = min(ans, len(str(N // A))) +    print(ans)