function main() {
  var digit_number_list = lines.map(function(line) {
    line = line.split(" ").map(function(num) {
      return parseInt(num, 10);
    });
    sum = line[0] + line[1];

    return sum.toString().length;
  });

  digit_number_list.forEach(function(digit_number) {
    console.log(digit_number);
  });
}

process.stdin.resume();
process.stdin.setEncoding("utf8");
var input_string = "";

process.stdin.on("data", function (chunk) {
  input_string += chunk;
});

process.stdin.on("end", function() {
  lines = input_string.split("\n");
  main();
});