#include <iostream>
#include <vector>

using namespace std;

int digitsofnum(int n) {
	int j = 0;
	while (n > 0) {
		n = n / 10;
		j++;
	}
	return j;
}

int main()
{
	int a, b;
	vector<int> dst;
	while (cin >> a >> b)
		dst.push_back(digitsofnum(a + b));
	for (vector<int>::iterator it = dst.begin(); it < dst.end(); it++)
		cout << *it << endl;
	return 0;
}
