object Main extends App {
  val n: Long = scala.io.StdIn.readLong()
  var i: Long = 1
  var digit = 10000000
  while (i<math.sqrt(n)) {
    if (n%i == 0) {
      digit = math.min(math.max(i.toString.length, (n/i).toString.length), digit)
    }
    i = i + 1
  }
  println(digit)
}