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

int main(void){
	
	int a[200], b[200], i;
	string str = "";
	ostringstream ostr;
	
	for(i=0; (cin >> a[i]) != NULL; i++){
		cin >> b[i];
	}
		
	for(i=0; a[i] != '\0'; i++){
	  ostr << a[i] + b[i];
		str = ostr.str();
		cout << str.length() << endl;
	}

	return 0;
}