process.stdin.resume();
process.stdin.setEncoding('utf8');

process.stdin.on('data', function (chunk) {
    var lines = chunk.toString().split(' ');
    var first = Number(lines[0]);
    var sqrt = Math.floor(Math.sqrt(first));
    
    while(first % sqrt !== 0){
        sqrt--;
    }
    
    var a = sqrt;
    var b = first / sqrt;
    var a_string_length = String(a).length;
    var b_string_length = String(b).length;
    var result = Math.max(a_string_length, b_string_length);
//    console.log(a);
//    console.log(b);
    console.log(result);
    
//    console.log(lines);
});