n = int(eval(input()))



ans = 10



def F(a,b):

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



i = 1

while i * i <= n:

	if n%i == 0:

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

		#print(i,n//i)

	i += 1

print(ans)

import math

n = int(eval(input()))

s = int(math.sqrt(n))



ans = 10**11



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

    if n%i == 0:

        z = n//i

        ans = min(ans,len(str(z)))

print(ans)



n = int(eval(input()))
ans = 10


def F(a, b):
    return max(len(str(a)), len(str(b)))


i = 1
while i * i <= n:
    if n % i == 0:
        ans = min(ans, F(i, n // i))
        # print(i,n//i)
    i += 1
print(ans)

import math

n = int(eval(input()))
s = int(math.sqrt(n))
ans = 10**11
for i in range(1, s + 1):
    if n % i == 0:
        z = n // i
        ans = min(ans, len(str(z)))
print(ans)

+import math + -ans = 10 - - -def F(a, b): -    return max(len(str(a)), len(str(b))) - - -i = 1 -while i * i <= n: +s = int(math.sqrt(n)) +ans = 10**11 +for i in range(1, s + 1): -        ans = min(ans, F(i, n // i)) -        # print(i,n//i) -    i += 1 +        z = n // i +        ans = min(ans, len(str(z)))