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, reduce to convert array of two values to single value
     // Explicit conversions between Integer and String 
     console.log(values.reduce(function(a, b) {
     return (parseInt(a) + parseInt(b)).toString();
     }, 0).length);
}