import java.io.{BufferedOutputStream, BufferedReader, InputStreamReader, PrintWriter}

object Main {
  def main(args: Array[String]): Unit = {
    val in = new BufferedReader(new InputStreamReader(System.in))
    val out = new PrintWriter(new BufferedOutputStream(System.out))
    val n = in.readLine().toLong

    var min = Integer.MAX_VALUE
    for (i <- 1 to Math.sqrt(n).toInt) {
      if (n % i == 0) {
        min = Math.min(min, Math.max(Math.log10(n / i).toInt, Math.log10(i).toInt) + 1)
      }
    }

    out.println(min)

    out.flush()
  }
}
