#include<iostream>
#include<cmath>
using namespace std;

int main(){
    int a, b, order, i;
    while (cin >> a >> b) {
        order = 0;
        for (i = 7; i > 0; i--) {
            if ((a + b) / pow(10, i-1) < 10) {
                order = i;
            }
        } 
        cout << order << endl;
    }
    return 0;
}
