// tested on node version 0.10.36
var fs = require("fs");
function digit_count(a) {
    return String(Math.floor(a)).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 = Number(parts.shift());
    var b = Number(parts.shift());
    var c = a + b;
    console.log(digit_count(a + b));
}