#include <iostream>
using namespace std;

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