#include <iostream>
#include <cmath>
using namespace std;
int main(){
	int a,b;
	while (1) {
		cin>>a;
		if(a == EOF)break;
		cin>>b;
		if(b == EOF)break;
		int ans = log10(a+b)+1;
		cout<<ans<<endl;
	}
	return 0;
}