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

int main(){
	int a, b, c, n=0, i=0, ans[1000];
	while(cin>>a>>b){
		c=a+b;
		while(c!=0){
			c/=10;
			n++;
		}
		ans[i]=n;
		n=0;
		i++;
	}
	int j=0;
	while(j<i){
		cout<<ans[j]<<endl;
		j++;
	}
	return 0;
}