var sample_input = require('fs').readFileSync('/dev/stdin', 'utf8');
var sets = (sample_input.trim()).split("\n");
sets.forEach(function(pair){
  var sum = pair.split(" ").map(Number).reduce(function(a,b){return a + b;},0);
  console.log(sum.toString().length);
});