import math

n=int(eval(input()))

tmp=math.ceil(n**0.5)+1

ans=1000000

for i in range(1,tmp):

    if n%i==0:

        tmp=n//i

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



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

ans=1000

for i in range(1,100001):

    if n%i==0:

        ans=min(ans,len(str(max(n//i,i))))

print(ans)
import math

n = int(eval(input()))
tmp = math.ceil(n**0.5) + 1
ans = 1000000
for i in range(1, tmp):
    if n % i == 0:
        tmp = n // i
        ans = min(ans, len(str(tmp)))
print(ans)

n = int(eval(input()))
ans = 1000
for i in range(1, 100001):
    if n % i == 0:
        ans = min(ans, len(str(max(n // i, i))))
print(ans)

-import math - -tmp = math.ceil(n**0.5) + 1 -ans = 1000000 -for i in range(1, tmp): +ans = 1000 +for i in range(1, 100001): -        tmp = n // i -        ans = min(ans, len(str(tmp))) +        ans = min(ans, len(str(max(n // i, i))))