#include<iostream>
#include<algorithm>
#include<cmath>
#include<string>
#include<vector>

using namespace std;

int main()
{
	int a[200], b[200], n, ans[200], p = 0;
	for (int i = 0; i < 200; i++) 
	{
		cin >> a[i] >> b[i];
		ans[i] = 0;
		n = a[i] + b[i];
		while (n >= 1) 
		{
			n /= 10;
			ans[i]++;
		}
		p++;
	}
	for (int j = 0; j < p; j++) {
		cout << ans[j] << endl;
	}
}
