#include <iostream>
#include <vector>

using namespace std;

int main() {
    int tmpa, tmpb;
    vector<int> a;
    vector<int> b;
    
    while (cin >> tmpa >> tmpb) {
        a.push_back(tmpa);
        b.push_back(tmpb);
    }
    
    for (int i = 0; i < a.size(); i++) {
        int sum = a[i] + b[i];
        int keta = 0;
        while (sum > 0) {
            sum /= 10;
            keta++;
        }
        cout << keta << endl;
    }

    return 0;
}
