n = io.read("*n")
lim = math.ceil(math.sqrt(n))
for i = lim, 1, -1 do
  if i * i <= n and n % i == 0 then
    z = n // i
    r = 0
    while 0 < z do
      r, z = r + 1, z // 10
    end
    print(r)
    break
  end
end
