n = int(input())

def cal(a):
  return len(str(a))
m = 11
for j in range(1,10**5+1):
  if n%j==0:
    m = min(m,max(cal(j),cal(n//j)))
    # print(m)
print(m)
b36b2f77812a9b09ceac8d42ac5e8e3c51a3abf1
<mask token>

<mask token>


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


<mask token>

<mask token>


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


<mask token>
for j in range(1, 10 ** 5 + 1):
    if n % j == 0:
        m = min(m, max(cal(j), cal(n // j)))
print(m)

n = int(input())


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


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

n = int(input())

def cal(a):
  return len(str(a))
m = 11
for j in range(1,10**5+1):
  if n%j==0:
    m = min(m,max(cal(j),cal(n//j)))
    # print(m)
print(m)