#include<iostream>
#include<cmath>
using namespace std;

int main()
{
	float a,b,c=0,d=0;
	while(1){
		cin>>a;
		cin>>b;
		if(a==c&&b==d)
			return 0;
		cout<<(int)log10(a+b)+1<<endl;
		c=a;
		d=b;
	}
}