'use strict'
function main(input) {
  const N = parseInt(input, 10);

  let maxB = 0;
  for (let A = 1; A < N; A++) {
    let B = N / A;
    if (Number.isInteger(B)) {
      maxB = B;
    }
    if (A > B) {
      break;
    }
  }

  const digit = maxB.toString().length;
  console.log(digit);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));