import io.StdIn.readLong
object Main extends App {
  def digitOf(n: Long) = math.log10(n).floor.toInt + 1

  val n = readLong
  println(digitOf((for (a <- 1 to math.sqrt(n).toInt; if n % a == 0; b = n / a) yield b).min))
}
