#include<cstdio>

int main(){

	int a, b, sum=0, x;
	scanf("%d, %d", a, b);
	sum = a+b;

	if(sum<10) x=1;
	else if(10<=sum && sum<100) x=2;
	else if(100<=sum && sum<1000) x=3;
	else if(1000<=sum && sum<10000) x=4;
	else if(10000<=sum && sum<100000) x=5;
	else if(100000<=sum && sum<1000000) x=6;

	printf("%d",x);

	return 0;
}