#include <iostream>
#include <algorithm>
using namespace std;
int main()
{
	int a, b;
	while (cin >> a&&cin >> b)
	{
		int c = a + b;
		int digit,i;
		for (i = 1, digit = 1;c / i != 0;i *= 10, digit++);
		cout << digit-1 << endl;
	}
	return 0;
}