import std.stdio, std.string,
			 std.conv, std.array, std.algorithm;

void main(){
	foreach(str; stdin.byLine()){
		if(str == "") break;
		auto tmp = str.split(" ").map!(to!int);
		auto res = tmp[0] + tmp[1];
		res = res.to!string.length;
		writeln(res);
	}
}