#include <iostream>
#include<vector>
#include<stdlib.h>
#include<algorithm>
#include<string>
using namespace std;



int main(void){

	int a, b,sum=0,count;

	for (;;){//??°????????????????????°?????????
		count = 0;
		cin >> a >> b;
		sum = a + b;
		if (a==NULL || !a)break;

		do{
			sum /= 10;
			count++;

		} while (sum / 10 != 0);
		//?????°???count?????°
		cout << count+1 << endl;

	}
	return 0;
}