function Main(input){
    input = input.split("\n");
    
    var n = input.length;
    for(var i = 0;i < n - 1;i++){
        input[i] = input[i].split(" ");
        var a = parseInt(input[i][0],10);var b = parseInt(input[i][1],10);
        var ans = 0;
        a += b;
        while(a > 0){
            ans++;a = Math.floor(a / 10);
        }
        console.log(ans);
    }
}
Main(require("fs").readFileSync("/dev/stdin","utf8"));