#include <iostream>
using namespace std;

int main() {
    
    int a;
    int b;
    int sum;
    int flag = 0;
    int count = 0;
    
    while(cin >> a >> b) {
        sum = a + b;
        while (!flag) {
            sum = sum / 10;
            count++;
            if(sum < 1) {
                flag = 1;
                cout << count << endl;
            }
        }
        flag = 0;
        count = 0;
    }
    return 0;
}