import math

b = eval(input())

a =int(b)

m = len(b)

for i in reversed(list(range(1,int(math.sqrt(a))+1))):

    if a/i == int(a/i):

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

        break

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



def cal(a):

  return len(str(a))

m = 11

for i in range(1,6):

  for j in range(1,10**i+1):

    if n%j==0:

      m = min(m,max(cal(j),cal(n//j)))

      # print(m)

print(m)
import math

b = eval(input())
a = int(b)
m = len(b)
for i in reversed(list(range(1, int(math.sqrt(a)) + 1))):
    if a / i == int(a / i):
        m = max(len(str(a // i)), len(str(i)))
        break
print(m)

n = int(eval(input()))


def cal(a):
    return len(str(a))


m = 11
for i in range(1, 6):
    for j in range(1, 10**i + 1):
        if n % j == 0:
            m = min(m, max(cal(j), cal(n // j)))
            # print(m)
print(m)

-import math +n = int(eval(input())) -b = eval(input()) -a = int(b) -m = len(b) -for i in reversed(list(range(1, int(math.sqrt(a)) + 1))): -    if a / i == int(a / i): -        m = max(len(str(a // i)), len(str(i))) -        break + +def cal(a): +    return len(str(a)) + + +m = 11 +for i in range(1, 6): +    for j in range(1, 10**i + 1): +        if n % j == 0: +            m = min(m, max(cal(j), cal(n // j))) +            # print(m)