#define _CRT_SECURE_NO_DEPRECATE
#include<iostream>
using namespace std;

int main()
{
	int a, b, sum, result=0;
	do{
		scanf("%d %d", &a, &b);
	}while(a < 0 || b < 0);
	sum = a + b;
	while (sum > 0){
		sum /= 10;
		result++;
	}
	cout << result;
	return 0;
}