#include<iostream>
#include<iomanip>

using namespace std;

int main()
{
	int a,b;
	while(cin >> a >> b){
		if(a<0 || b<0 ||a>1000000 || b>1000000)
			break;
		int temp = a+b,count;
		for(count = 0;;++count)
			if(!(temp/=10))
				break;
		cout <<count+1<<endl;
	}

	return 0;
}