#include <iostream>
using namespace std;

int main()
{
	int a, b;
	while (cin >> a >> b){
		int sum = a + b;
		int counter = 1;
		while (sum > 9){
			counter++;
			sum = sum / 10;
		}
		if (a == 0 && b == 0)
			cout << 0 << endl;
		else
			cout << counter << endl;
	}
	return 0;
}