n=int(eval(input()))

def f(a,b):

    a=str(a)

    b=str(b)

    return(max(len(a),len(b)))



def make_divisors(n):

    divisors = []

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

        if n % i == 0:

            divisors.append(i)

            if i != n // i:

                divisors.append(n//i)

    divisors.sort()

    return divisors



l=make_divisors(n)

ans=10**9+7

for i in l:

    ans=min(ans,f(i,n//i))



print(ans)



n=int(eval(input()))

def make_divisors(n):

    divisors = []

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

        if n % i == 0:

            divisors.append(i)

            if i != n // i:

                divisors.append(n//i)

    divisors.sort()

    return divisors



l=make_divisors(n)

m=len(l)

ans=10**100

for i in range(min(m//2+1,m)):

    a,b=len(str(l[i])),len(str(n//l[i]))

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

print(ans)



n = int(eval(input()))


def f(a, b):
    a = str(a)
    b = str(b)
    return max(len(a), len(b))


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5) + 1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n // i)
    divisors.sort()
    return divisors


l = make_divisors(n)
ans = 10**9 + 7
for i in l:
    ans = min(ans, f(i, n // i))
print(ans)

n = int(eval(input()))


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5) + 1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n // i)
    divisors.sort()
    return divisors


l = make_divisors(n)
m = len(l)
ans = 10**100
for i in range(min(m // 2 + 1, m)):
    a, b = len(str(l[i])), len(str(n // l[i]))
    ans = min(ans, max(a, b))
print(ans)

- - -def f(a, b): -    a = str(a) -    b = str(b) -    return max(len(a), len(b)) -ans = 10**9 + 7 -for i in l: -    ans = min(ans, f(i, n // i)) +m = len(l) +ans = 10**100 +for i in range(min(m // 2 + 1, m)): +    a, b = len(str(l[i])), len(str(n // l[i])) +    ans = min(ans, max(a, b))