
#include <cstdio>
#include <cstring>
#include <sstream>
#include <iostream>
#include <string>

int main(void)
{
    int a, b;
    char res[256];

    std::string str;

    while (getline(std::cin, str)) {
        std::istringstream str_s(str);
        str_s >> a >> b;

        sprintf(res, "%d", a+b);

        std::cout << strlen(res) << std::endl;
    }

    return 0;
}