#include<iostream>
#include<string>
#include<sstream>
using namespace std;

int main()
{


	int a, b;
	while (cin >> a >> b) {
		stringstream ss;
		string sum;
		ss << a + b;
		sum = ss.str();

		cout << sum.size() << endl;
	}

	return 0;
}