// tested on node version 0.10.36
var fs = require("fs");
function digit_count(c) {
    return String(c).length;
}
var input = fs.readFileSync('/dev/stdin').toString();
var lines = input.split("\n");
for(var i = 0; i < lines.length; i++) {
    var parts = lines[i].split(" ");
    var a = parseInt(parts.shift());
    var b = parseInt(parts.shift());
    if(!isNaN(a + b)) {
        console.log(digit_count(a + b));
    }
}