
object Main extends App {
	def Ndigits(x: Int): Int = {
		var z = x;
		var i = 1
		while(z > 1){
			z = z / 10;
			i = i + 1;
		}
		i
	}

	val N = io.StdIn.readLine.toInt
	var result = N;

	for(i <- 1 to N/2){
		if(N%i == 0){
			val temp = math.max(Ndigits(i), Ndigits(N/i))
			if(result > temp){
				result = temp;
			}
		}
	}

	println(result)
}