var input = require('fs').readFileSync('/dev/stdin', 'utf8');

var line = (input.trim()).split("\n");

for(i = 0; i < line.length; i++) {
  var val = line[i].split(" ").map(Number);
  var res = val[0] + val[1];

  console.log((res + "").length);
}