#include<iostream>
#include<cstdlib>
#include<string>

using namespace std;

int main()
{
	int a, b;
	string s;
	char sp[8];
	while(cin >> a >> b)
	{
		itoa(a + b, sp, 10);
		s = sp;
		cout << s.size() << endl;
	}
	return 0;
}