#include <iostream>
#include <string>
using namespace std;

int main()
{
	string strNumber;
	long long int iNumberA,iNumberB,iLength[256],i=0;

	while( i < 200 ){
		cin >> iNumberA;
		cin >> iNumberB;

		strNumber = to_string( iNumberA+iNumberB );

		iLength[i] = strNumber.length();

		i++;
	}

	for( int i=0;i<200;i++ ){
		if( iLength[i] == 0 ) break;

		cout << iLength[i] << endl;
	}

	return 0;
}