#include <iostream>
#include <algorithm>
#include <string>
using namespace std;

int main() {
    int a, b;

    while (cin >> a >> b) {
        int sum = a + b;
        string s = to_string(sum);
        cout << s.length() << endl;
    }

    return 0;
}
