var input = [];
var data = [];
process.stdin.resume();
process.stdin.setEncoding("utf8");
process.stdin.on('data', function(chunk){
   input = chunk.toString("utf8").split("\n");
});
process.stdin.on('end', function(){
    for (var i = 0; i < input.length; i++) {
        data[i] = input[i].split(" ");
        var a = parseInt(data[i].shift());
        var b = parseInt(data[i].shift());
        //if(!isNaN(a + b)) {
            console.log(String(a + b).length)
        //}
    }
});