function Main(input) {
    lines=input.split("\n");
    for(i in lines){
      input_line = lines[i].split(' ')
      let a = Number(input_line[0])
      let b = Number(input_line[1])
      console.log(String(a + b).length)
    }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
