"use strict"

const f = (A, B) => {
  return Math.max(String(A).length, String(B).length);
}

function Main(input) {
  input = parseInt(input.trim(), 10);
  const max = Math.floor(Math.sqrt(input));

  let ret = 1e10;
  for(let i=0; i<=max; i++){
    if(input%i === 0){
      let A = input / i;
      let k = f(A, i);
      if(k < ret) ret = k;
    }
  }

  console.log(ret);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));