function Main(s) {
  var s = Number(s.split("\n")[0]);
  var l = Math.ceil(Math.sqrt(s));
  var b, f;
  var min = 12;
  for (var a = 1; a <= l; a++) {
    if (s % a === 0) {
      b = s / a;
      f = Math.max(String(a).length, String(b).length);
      min = f < min ? f:min;
    }
  }
  console.log(min);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));