#include <iostream>
#define  N 3

int main()
{
	int a[N]={-1}, b[N]={-1}, num[N],answer[N] = {-1};

	for(int i=0; i<N; ++i)
	{
		std::cin >> a[i] >> b[i];

		num[i] = a[i] + b[i];

		if(num[i] < 10)
		{
			answer[i] = 1;
		}

		else if(num[i] < 100)
		{
			answer[i] = 2;
		}

		else if(num[i] < 1000)
		{
			answer[i] = 3;
		}

		else if(num[i] < 10000)
		{
			answer[i] = 4;
		}

		else if(num[i] < 100000)
		{
			answer[i] = 5;
		}

		else if(num[i] < 1000000)
		{
			answer[i] = 6;
		}

		else
		{
			answer[i] = 7;
		}
	
	}

	for(int j=0; j<N; ++j)
	{
		std::cout << answer[j] << '\n';
	}
	
}