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

  var ans = Int.MaxValue
  var i = 1L
  while (i * i <= n) {
    if (n % i == 0) {
      ans = ans.min(i.toString.length.max((n / i).toString.length))
    }
    i += 1
  }

  println(ans)
}
