function Main(input) {
    lines=input.split("\n");
    for(i in lines){
	if(lines[i]=="")break;
	n=lines[i].split(" ").map(function(x){return x-0;});
	sum=n[0]+n[1];
	console.log(sum.toString().length);
    }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));