N=int(eval(input()))

M=int((N**(1/2)))

mult=0

while 1:

    for i in [-1,1]:

        x=M+i*mult

        if not N%x:

            print((max([len(str(x)),len(str(int(N/x)))])))

            exit()

    mult+=1

N=int(eval(input()))

M=int((N**(1/2)))

print((min([max([len(str(i)),len(str(int(N/i)))]) for i in range(1,M+1) if N%i==0])))

N = int(eval(input()))
M = int((N ** (1 / 2)))
mult = 0
while 1:
    for i in [-1, 1]:
        x = M + i * mult
        if not N % x:
            print((max([len(str(x)), len(str(int(N / x)))])))
            exit()
    mult += 1

N = int(eval(input()))
M = int((N ** (1 / 2)))
print(
    (
        min(
            [
                max([len(str(i)), len(str(int(N / i)))])
                for i in range(1, M + 1)
                if N % i == 0
            ]
        )
    )
)

-mult = 0 -while 1: -    for i in [-1, 1]: -        x = M + i * mult -        if not N % x: -            print((max([len(str(x)), len(str(int(N / x)))]))) -            exit() -    mult += 1 +print( +    ( +        min( +            [ +                max([len(str(i)), len(str(int(N / i)))]) +                for i in range(1, M + 1) +                if N % i == 0 +            ] +        ) +    ) +)