'use strict'

function main(s) {

  const N = Number(s);
  let answer = 10000000000;

  for (let i = 1; i <= Math.sqrt(N); i++) {
    if (Number.isInteger(N / i)) {
      const max = Math.max(String(i).length, String(N / i).length);
      answer = Math.min(answer, max);
    }
  }

  console.log(answer);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));
