import math

n=int(eval(input()))

ans=10

for i in range(1,int(math.sqrt(n))+1):

    if n%i==0:

        b=int(n/i)

        f=max(len(str(i)),len(str(b)))

        ans=min(f,ans)

print(ans)
import math

n=int(eval(input()))

ans=100

for a in range(1,int(math.sqrt(n))+1):

    if n%a==0:

        m=max(len(str(a)),len(str(n//a)))

        ans=min(ans,m)

print(ans)
import math

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

import math

n = int(eval(input()))
ans = 100
for a in range(1, int(math.sqrt(n)) + 1):
    if n % a == 0:
        m = max(len(str(a)), len(str(n // a)))
        ans = min(ans, m)
print(ans)

-ans = 10 -for i in range(1, int(math.sqrt(n)) + 1): -    if n % i == 0: -        b = int(n / i) -        f = max(len(str(i)), len(str(b))) -        ans = min(f, ans) +ans = 100 +for a in range(1, int(math.sqrt(n)) + 1): +    if n % a == 0: +        m = max(len(str(a)), len(str(n // a))) +        ans = min(ans, m)