import std.stdio,std.string,std.conv,std.math;
void main(){
	while(1){
		string[] arr;
		int[] arr2;arr2.length=2;
		auto rd = chomp( readln() );
		if(rd){
			arr = split(rd);
			arr2[0] = to!int(arr[0]);
			arr2[1] = to!int(arr[1]);
			auto sum = to!string(arr2[0] + arr2[1]);
			writeln( sum.length );
		}else{
			break;
		}
	}
}