process.stdin.resume();
process.stdin.setEncoding('utf8');

// Get lines from standard input.
var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var lines = input.split("\n");
// For each of the lines, use for because it is faster than foreach
for (var counter = 0; counter < lines.length; counter++) {
	 // Split on space
     var values = lines[counter].split(" ");
     // Console.log to print
     // Explicit conversions between Integer and String
     var value = (parseInt(values[0]) + parseInt(values[1])).toString().length;
     console.log(value);
}