const input = require("fs").readFileSync("/dev/stdin", "utf8")

;(input => {
  
  const N = input - 0
  
  const dev = []
  
  for (let i = 1; i * i <= N; i++) {
    if (N % i === 0) {
      dev.push(i, N / i)
    }
  }
  
  dev.sort((a, b) => a - b)
    
  console.log(dev[dev.length / 2].toString().length)
  
})(input)
