var input = require("fs").readFileSync("/dev/stdin", "utf8");
var abs = input.trim().split('\n');
abs.forEach(function(ab) {
  console.log((ab.split(' ').reduce(function(m, e) {return +e + m}, 0) + "").length);
});