#include<iostream>
using namespace std;

int main(){
    int count = 0;
    int digit_num;
    int a[200],b[200];
    int sum;
    while(1){
        cin >> a[count] >> b[count];
        if(a[count] >=0 && a[count] <= 1000000)
            if(b[count] >= 0 && b[count] <= 1000000){
                sum = a[count] + b[count];
                digit_num = 1;
                while((sum/10) != 0){
                    digit_num ++;
                    sum = sum / 10;
                }
                cout << digit_num<<endl;
                count++;
                if(count >200) break;
            }
    }
    return 0;
}