import std.stdio;
import std.conv;
import std.algorithm;
import std.string;
import std.file;
 
int main() {
        int[] hs;
        string l;
        while((l = readln()).length >= 2) printf("%d\n", to!string(to!int(l.split()[0]) + to!int(l.split()[1])).length);
        return 0;
}