#include<iostream>

using namespace std;

int main()
{
	int a,b,c,d=1000000,e=7;
	for(int i=1;i<=200;i++){
		cin>>a>>b;
		c=a+b;
		while(1){
			if(1<=c/d){
				cout<<e<<endl;
				break;
			}
			else if(1>c/d){
				e--;
				d=d/10;
			}
		}
		d=1000000,e=7;
	}	
	return 0;
}  