function main(input) {
  var num = input.split("\n");

  num.slice(0, num.length - 1).forEach(function(value) {
    var a = value.split(" ");
    var num = (parseInt(a[0]) + parseInt(a[1]));
    console.log(String(num).length);
  });
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));