#include <stdio.h>

int main(void)
{
	int a,b;
	int i;
	int count_1=0;
	int count_2 = 0;
	scanf("%d %d",&a,&b);
	
	while(a / 10 >= 1)
	{
		a = a/10;
		count_1++;
	}
	while(b / 10 >= 1)
	{
		b = b/10;
		count_2++;
	}
	printf("%d\n",count_1+count_2+2);
}