#include<stdio.h>
#include<math.h>

int main()
{
	long int a,b,sum;/*足す数*/
	
	while(scanf("%d %d",&a,&b)!=EOF)
	{
		if(a<0 || b<0)
			continue;
		sum = a+b;
		printf("%d\n",(int)log10((float)sum)+1);
	}
	return 0;
}