n=int(eval(input()))

a=0

l=[]

for i in range(int(n**(1/2))+1)[:0:-1]:

  if n%i==0:

    a+=1

    l.append(max(len(str(i)),len(str(n//i))))

  if a==3:break

print((min(l)))
from math import sqrt

n=int(eval(input()))

for i in range(int(sqrt(n)),0,-1):

  if n%i==0:

    print((max(len(str(i)),len(str(n//i)))))

    exit()

n = int(eval(input()))
a = 0
l = []
for i in range(int(n ** (1 / 2)) + 1)[:0:-1]:
    if n % i == 0:
        a += 1
        l.append(max(len(str(i)), len(str(n // i))))
    if a == 3:
        break
print((min(l)))

from math import sqrt

n = int(eval(input()))
for i in range(int(sqrt(n)), 0, -1):
    if n % i == 0:
        print((max(len(str(i)), len(str(n // i)))))
        exit()

+from math import sqrt + -a = 0 -l = [] -for i in range(int(n ** (1 / 2)) + 1)[:0:-1]: +for i in range(int(sqrt(n)), 0, -1): -        a += 1 -        l.append(max(len(str(i)), len(str(n // i)))) -    if a == 3: -        break -print((min(l))) +        print((max(len(str(i)), len(str(n // i))))) +        exit()