#include<iostream>
using namespace std;

int main(){
	int a[200],b[200],i=0,sum,count;
	while(cin>>a[i]){
		cin>>b[i];
		i++;
	}
	for(int j=0;j<i;j++){
		sum = a[j]+b[j];
		count = 0;
		while(sum != 0){
			sum/=10;
			count++;
		}
		cout<<count<<endl;
	}
    return 0;
}