var Main = function(input){
	var list = input.split("\n");
	for(var i = 0; i < list.length; i++){
		console.log(String(Number(list[i].split(" ")[0]) + Number(list[i].split(" ")[1])).length);
	}
};

Main(require("fs").readFileSync("/dev/stdin", "utf8"));