fun main(args: Array<String>){

    var N = readLine()!!.toLong()

    for(i in Math.sqrt(N.toDouble()).toInt() downTo 1){
        if( N % i == 0L){
            var A = N / i
            var B = N / A
            if(A >= B){
                print(A.toString().length)
            } else {
                print(B.toString().length)
            }
            break
        }
    }

}
