function Main(i) {
  i.split("\n").forEach(function(a) {                                         
    console.log(a.split(" ").reduce(function(x,y){return (x-0)+(y-0)}).toString().length);});                                                                           
}                                                                               
Main(require("fs").readFileSync("/dev/stdin", "utf8"));