from math import sqrt

n=int(eval(input()))

ans=[]

k=int(sqrt(n))

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

    if n%i==0:

        ans.append(len(str(int(n/i))))

ans.sort()

print((ans[0]))
def c(num):

    cnt=0

    while num>0:

        num//=10

        cnt+=1

    return cnt



def main():

    n=int(eval(input()))

    ans=10**10

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

        if n%i!=0:

            continue

        b=n//i

        ret=max(c(i),c(b))

        if ans>ret:

            ans=ret

    print(ans)



main()
from math import sqrt

n = int(eval(input()))
ans = []
k = int(sqrt(n))
for i in range(1, k + 1):
    if n % i == 0:
        ans.append(len(str(int(n / i))))
ans.sort()
print((ans[0]))

def c(num):
    cnt = 0
    while num > 0:
        num //= 10
        cnt += 1
    return cnt


def main():
    n = int(eval(input()))
    ans = 10**10
    for i in range(1, int(n**0.5) + 1):
        if n % i != 0:
            continue
        b = n // i
        ret = max(c(i), c(b))
        if ans > ret:
            ans = ret
    print(ans)


main()

-from math import sqrt +def c(num): +    cnt = 0 +    while num > 0: +        num //= 10 +        cnt += 1 +    return cnt -n = int(eval(input())) -ans = [] -k = int(sqrt(n)) -for i in range(1, k + 1): -    if n % i == 0: -        ans.append(len(str(int(n / i)))) -ans.sort() -print((ans[0])) + +def main(): +    n = int(eval(input())) +    ans = 10**10 +    for i in range(1, int(n**0.5) + 1): +        if n % i != 0: +            continue +        b = n // i +        ret = max(c(i), c(b)) +        if ans > ret: +            ans = ret +    print(ans) + + +main()