var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var lines = input.split('\n');
 
for (var i = 0; i < lines.length; i++) {
    if (lines[i] == '') break;
    var vals = lines[i].split(' ').map(function(i){return +i;});
    var a = vals[0] + vals[1];
    var str = a + '';
    console.log(str.length);
}