import java.io.InputStreamReader
import java.io.BufferedReader

fun main(args: Array<String>) {
  val br = BufferedReader(InputStreamReader(System.`in`))

  val n = br.readLine().toLong()

  tailrec fun digit(acc: Int, i: Long):Int =
    if(i == 0L) acc else digit(acc+1, i/10)

  tailrec fun rec(a: Long): Int =
    if(n % a == 0L) {
      val b = n / a
      Math.max(digit(0, a), digit(0, b))
    }
    else rec(a-1)

  val nSqrt = Math.sqrt(n.toDouble()).toLong()
  val ans = rec(nSqrt)

  println(ans)
}