#include <stdio.h>

int main()
{
	int a =0;
	int b = 0; 
	int ans = 0;
	while(scanf("%d,%d",a,b)!=EOF)
	{
		a += b;
		while(1)
		{
			a /= 10;
			ans++;
			if(a = 0)
			{
				printf("%d",ans);
				break;
			}
		}
	}
	return 0;
}