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

string int2str(int n){
	stringstream ss;
	ss<<n;
	string text;
	ss>>text;
	return text;
}

int main(void){

	while (true){
		int a,b;
		cin>>a;
		if (cin.eof()) break;
		cin>>b;
		cout<<int2str(a+b).size()<<endl;
	}
	
	return 0;
} 