#include<iostream>
#include<iomanip>
#include<string>
#include<vector>
#include<set>
#include<algorithm>
#include<map>
#include<cmath>

using namespace std;

int main()
{
	int m,n,p,sum;
	while(cin>>m>>n)
	{
		sum=m+n;
		p=0;
		for(;sum!=0;sum=sum/10)
		{
			p++;
		}
		cout<<p<<endl;
	}
	return 0;
}