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

void main() {
    auto input = getStdin!(string[]);
    foreach (line; input) {
    	auto num = line.split(" ").to!(long[]);
    	auto sum = num[0] + num[1];
    	auto digit = sum.to!(string).length;
    	digit.writeln;
    }
}

T getStdin(T)() {
    string[] cmd;
    string line;
    while ((line = chomp(stdin.readln())) != "") cmd ~= line;
    return to!(T)(cmd);
}