import std.stdio;
import std.string;
import std.conv;

immutable MIN = 0;
immutable MAX = 1000000;
immutable DATA_SET = 200;

int main(string[] argv)
{
	string[] ans;

	char[] buf;
	while(stdin.readln(buf)){
		int temp1 = buf.split(" ")[0].chomp().to!int();
		int temp2 = buf.split(" ")[1].chomp().to!int();
		ans ~= (temp1 + temp2).to!string();
	}

	foreach(string str;ans){
		writeln(str.length);
	}

    return 0;
}