#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{
	const int BUFF_SIZE = 100;
	char buff[BUFF_SIZE];
	
	while (NULL != fgets(buff, BUFF_SIZE, stdin))
	{
		int a, b;
		sscanf(buff, "%d %d", &a, &b);
		sprintf(buff, "%d", a + b);
		printf("%d\n", strlen(buff));
	}
	
	return 0;
}