
fun main(arr:Array<String>) {
    val num = readLine()!!.toLong()
    var tmp = Pair<Long, Long>(1,num)
    for(i in (2..num)) {
        if(i*i> num) {
            break
        }
        if(num % i == 0L) {
            tmp = Pair(i, num / i)
        }
    }
    val ans = Math.max(tmp.first, tmp.second).toString().length
    println(ans)
}

