#include<iostream>
using namespace std;

int main(){
	while(1){
		int a,b,sum;
		cin>>a;
		if(a == EOF){
			break;
		}
		cin>>b;
		
		sum = a+b;
		int degit=1;
		while(1){
			if(sum/10==0){
				break;
			}
			sum = sum/10;
			degit++;
		}
		cout<<degit<<endl;
	}
	return 0;
}