#include<iostream>

using namespace std;

int main()
{
	int num1, num2,sum;
	int n = 1;
	cin >> num1 >> num2;

	sum = num1 + num2;

	while (true)
	{
		int po = pow(10, n);
		if (!((sum % po) == sum))
			n++;
		else
			break;
	}

	cout << n << endl;

	cin >> n;
	return 0;
}