import java.util.*

fun main(args: Array<String>) {

    val scanner = Scanner(System.`in`)
    val N = scanner.nextLong()
    val root = Math.sqrt(N.toDouble()).toLong()
    var minDigit = Integer.MAX_VALUE
    (1..root).forEach { sosuu ->
        if (N % sosuu == 0L) {
            val sosuu2 = N / sosuu
            val digit = F(sosuu, sosuu2)
            if (minDigit > digit) {
                minDigit = digit
            }
        }
    }
    println(minDigit)
}

fun F(A: Long, B: Long): Int = Math.max(A.toString().length, B.toString().length)