#include "stdio.h"

int main(){
	int a=0,b=0,c=0,count=0;
	while(1){
	scanf("%d %d",&a,&b); 
	c = a + b;
	while(c > 0){
		c = c/10;
		count++;
	}
	printf("%d\n",count);
	if(count == 4){break;} 
	count = 0;
	}
}