import std.stdio;	
import std.array;	
import std.conv;	
import std.math;
import std.string;

void main()
{
	int[] addinput = new int[200];
	int anslength;
	string s;
	int i = -1;
	while( (s=readln()).length != 1 )
	{
		i ++;
		anslength = i;
		string[] input = split(s);
		int a = to!int(input[0]); 
		int b = to!int(input[1]); 
		addinput[i] = cast(int)log10(a + b);
	}
	for(int j = 0; j <= anslength; j++)
	{
		writeln(addinput[j]);
	}
}