import java.util.Scanner

object Main extends App  {
  val sc = new Scanner(System.in)
  val n = sc.nextLong

  val nSqrt = Math.sqrt(n).floor.toLong

  val a = (nSqrt to 1 by -1).find(n % _ == 0).get
  val res = (n / a ).toString.length

  println(res)
}
