object Main extends App {
	val N = scala.io.StdIn.readLong
	val T = math.sqrt(N).toLong

	@inline def check(x: Long): Int = {
		var ans = 1
		var tp1 = x
		var tp2 = 10L
		while(tp1/tp2 != 0){
			ans += 1
			tp2 *= 10L
		}
		return ans
	}

	var ans = Int.MaxValue

	for(x<-1L to T){
		if(N%x == 0){
			val y = N/x
			val p = math.max(check(x), check(y))
			ans = math.min(ans, p)
		}
	}

	println(ans)

	
}