#include<iostream>
using namespace std;


int main(){
	int a,b,c,d,i;
	
	while(1){
		cin >> a >> b ;

		/*if((a >= 0) && (a <= 1000000)){
			if((b >= 0) && (b <= 1000000))
				break ;
		}*/

		if(cin.eof() )
			break ;
		

		c = a + b ;

		for(i=1;i<7;i++){
			c = c / 10 ;
			if(c == 0) break;

		}

		cout << i << endl ;

		
	}
	
    return 0;
}