#include<iostream>
#include<cmath>

using namespace std;

int main()
{
	int num1[3], num2[3], sum[3];
	for (int i = 0; i < 3; i++)
	{
		cin >> num1[i] >> num2[i];
		sum[i] = num1[i] + num2[i];
	}
	
	for (int i = 0; i < 3; i++)
	{
		int n = 1;

		while (!((sum[i] % (int)pow(10, n)) == sum[i]))
			n++;

		cout << n << endl;
	}
	return 0;
}