var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var lines = input.split('\n');



if(lines.length > 200) {
	console.log("Invalid dataset size. Dataset size is "+lines.length+" but must be <= 200");
} else {
	for (var i = 0; i < lines.length; i++) {
		var line = lines[i].trim();
	    if (line == '') break;
	    var vals = line.split(' ').map(function(i){return +i;});
	    if(vals.length != 2 || isNaN(vals[0])|| isNaN(vals[1]) || vals[0] < 0 || vals[0] > 1000000 || vals[1] < 0 || vals[1] > 1000000) {
	    	console.log("invalid dataset: "+line+ ". Use 0 <= a, b <= 1,000,000");
	    } else {
	    	var a = vals[0] + vals[1];
	    	var str = a + '';
	    	console.log(str.length);
		}
	}
}