#include<iostream>

using namespace std;

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