function getlength(num1,num2) {
    var n1=num1.toString().length;
    var n2=num2.toString().length;
    return n1+n2;
}
var input1 = require('fs').readFileSync('/dev/stdin', 'utf8');
var input2 = require('fs').readFileSync('/dev/stdin', 'utf8');
console.log(getlength(input1,input2));