import kotlin.math.sqrt

fun main() {
    val N = readLine()!!.toLong()
    var A = 0L
    val sq = sqrt(N.toDouble()).toLong()
    for (i in 1L..sq) {
        if (N % i == 0L) {
            A = i
        }
    }
    val B = N / A
    val cnt = B.toString().length
    println(cnt)
}