n,r=int(eval(input())),1e9

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

  if n%i==0:r=min(r,len(str(n//i)))

print(r)
n,r=int(eval(input())),1e9

print((min([len(str(n//i)) for i in range(1,int(n**.5)+1) if n%i==0])))
n, r = int(eval(input())), 1e9
for i in range(1, int(n**0.5) + 1):
    if n % i == 0:
        r = min(r, len(str(n // i)))
print(r)

n, r = int(eval(input())), 1e9
print((min([len(str(n // i)) for i in range(1, int(n**0.5) + 1) if n % i == 0])))

-for i in range(1, int(n**0.5) + 1): -    if n % i == 0: -        r = min(r, len(str(n // i))) -print(r) +print((min([len(str(n // i)) for i in range(1, int(n**0.5) + 1) if n % i == 0])))