#include<iostream>
#include<string>

using namespace std;

int main()
{
	for(;;){
		int a, b, i;
		
		scanf("%d%d",&a,&b);
		
		if(a == EOF || b == EOF){
			break;
		}
		
		a += b;
		
		for(i = 1;; i++){
			if(a < 10){
				break;
			}
			a = a / 10;
		}
		
		cout << i << endl;
	}
}