#include <iostream>
using namespace std;

int size = 200;

int main(void) {
    int a[size];
    int b[size];
    int sum;
    int i = 0;
    
    while(i < 200) {
        cin >> a[i];
        cin >> b[i];
        sum = a[i] + b[i];
        
        int check = 1;
        for(int i = 0; i < 7; ++i) {
            if(sum < check - 1) {
                cout << i << endl;
                break;
            }
            check *= 10;
        }
        i++;
    }
}

