import java.util.Scanner

object Main {
  def solve(N: Long): Int = {
    val a = (1 to math.sqrt(N).toInt).reverse.find { a =>
      N % a == 0
    }.get
    val b = N / a
    math.log10(b).toInt + 1 // aは(1-√N)なので必ずbが大きい
  }

  def main(args: Array[String]): Unit = {
    val N = new Scanner(System.in).nextLong()
    println(solve(N))
  }
}
