const os = require('os');
function func(line) {
	var nums = line.split(' ');
	var a = parseInt(nums[0]) + parseInt(nums[1]);
 	results.push(a.toString().length);
}

var results = [];
var input = '';


process.stdin.setEncoding('utf8');
process.stdin.on('data', function(data) {
  input += data;
  var index = input.indexOf(os.EOL);
  while(index > -1){
  	var line = input.substring(0, index);
  	input = input.substring(index + 1);
  	func(line);
  	index = input.indexOf(os.EOL);
  }
});
process.stdin.on('end', function(data) {
	if(input.length > 0){
		func(input);
	}
  process.stdout.write(results.join(os.EOL));
});
process.stdin.resume();