// forked from tym1101's "?????°??????1???????????°???" http://jsdo.it/tym1101/odIV
// forked from tym1101's "?¨??????\??????" http://jsdo.it/tym1101/xoLY

var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var gyo = input.split("\n");

//http://qiita.com/kaminaly/items/cdf48940f64a21496554
var getDigits = function(num, base) {
  if (base == null) base = 2;
  return Math.log(num) / Math.log(base) + 1 | 0;
};
    
   
    for(i=0; i<gyo.length; i++)
        gyo[i] = gyo[i].split(" ");
    
    for(i=0; i<gyo.length; i++)
        for(j=0; j<2; j++)
            gyo[i][j] = parseInt(gyo[i][j], 10);
    
    for(i=0; i<gyo.length; i++)
        console.log(getDigits(gyo[i][0]+gyo[i][1], 10));