var a = readline();
var b = readline();
function caculateNumber(a, b) {
  var sumNumber;
  sumNumber = (a + b).toString();
  var i = 0;
  while (typeof sumNumber[i + 1] !== 'undefined') {
    i++;
  }
  print(i);
??};
caculateNumber(a, b);