fun main(args: Array<String>) {
    val n = readLine()?.toLong() ?: return
    Math.sqrt(n.toDouble()).toLong().downTo(1).forEach {
        if (n % it == 0L) {
            println(Math.max("$it".length, "${n / it}".length).toString())
            return
        }
    }
}