#include<iostream>
using namespace std;
int main(){
int a=0,b=0,c=0;
while(cin>>a>>b){
	if(a+b==0){
		cout<<c<<endl;
		c=0;
	}
	else{
	for(int x=1;x<=a+b;x=x*10){
		c=c+1;	
	}
	cout<<c<<endl;
	c=0;
}
}
}
	