#include<iostream>
using namespace std;

int main(){
	int a, b, sum, cou;
	
	while(cin >>a >>b && a != EOF && b != EOF){
		sum = a + b;
		cou = 0;
		while(sum != 0){
			sum = sum / 10;
			cou++;
		}
		cout <<cou<<endl;
	}
	
	return 0;
}