#include <iostream>
#include <sstream>
#include <algorithm>
#include <functional>
using namespace std;

int main(void)
{
    while (1)
    {
        int a, b;
        cin >> a >> b;
        if (cin.eof())
            break;
        stringstream ss;
        ss << a + b;
        cout << ss.str().length() << endl;
    }
    return 0;
}