#include <iostream>
using namespace std;

int main(){
	int i;
	int count;
	int a[200],b[200],sum[200];
	int temp = 0;

	while(cin >> a[temp] >> b[temp])
	{
		sum[temp] = a[temp] + b[temp];
		temp++;	
	}

	for (i = 0; i < temp; i++)
	{
		count = 0;

		while(sum[i] > 0){
			sum[i] = sum[i] / 10;
			count++;
		}

		cout << count << endl;

	}

	return 0;

}
