import java.util.Scanner

import scala.collection.mutable.ArrayBuffer

object Main extends App {
  def solve: Unit = {
    val sc = new Scanner(System.in)
    val N = sc.next.toLong
    var divisor = new ArrayBuffer[Int]
    for (i <- 1 to 100000) {
      if (N % i == 0) {
        divisor += i
      }
    }
    var ans = 1000000
    for (i <- divisor) {
      ans = math.min(ans, math.max(i.toString.length, (N / i).toString.length))
    }
    println(ans)
  }

  solve
}
