#include<iostream>
#define element 2

using namespace std;

int a[element], b[element], n[element], m[element];

int main()
{
	for(int i=0;i<=element;++i)
	{
		cin >> a[i] >> b[i];
		n[i] = a[i] + b[i];
	}
	for(int i=0;i<=element;++i)
	{
		m[i] = 1;
		while(n[i]>=10)
		{
			n[i]=n[i]/10;
			++m[i];
		}
		printf ("%d\n",m[i]);
	}
	return 0;
}