fun main(args: Array<String>) {
    val n= readLine()!!.toLong()
    val rtn=Math.sqrt(n.toDouble()).toLong()
    println( digit(n / (1..rtn).last{n%it==0L}) )
}

fun digit(a:Long) = a.toString().length
