#include <iostream>
using namespace std;

int main(){
	int a, b, k;
	cin >> a;
	while (a != ' ')
	{
		cin >> b;
		b += a;
		k = 0;
		while(b >= 1)
		{
			b /= 10;
			k += 1;
		}
		cout << k << endl;
		cin >> a;
	}
	return 0;
}