"use strict";
    
const main = arg => {
    const N = parseInt(arg.split("\n")[0]);
  	let ans = 0;
 	let m = 0;
  	let roopNum = Math.sqrt(N);
  	for(let i = 1; i <= roopNum; i++){
    	if(N % i == 0){
        	m = i
        }
    }
  	// 約数同士でどちらが大きいかを比較
	ans = N/m > m ? N/m : m;
  	console.log(String(ans).length);
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
