var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var data = (input.trim()).split('\n');

/**
 * Prints digit number of sum of two integers
 * @param {Array} data
 */
function main(data) {
  for (var i = 0; i < data.length; i++) {
    console.log(digitNumber(data[i]));
  }
}

/**
 * Returns the output to be printed
 * @param {String} numbers
 * @returns {Number}
 */
function digitNumber(numbers) {
  var ary = numbers.split(' ');
  var numberString = String(Number(ary[0]) + Number(ary[1]));
  return numberString.length;
}

main(data);