#include<iostream>
using namespace std;

int main(){
    int A[200];
    int B[200];
    int i;
    for(i = 0; i < 200; i++){ A[i] = -1; B[i] = -1; }
    for(i = 0; i < 200; i++){ cin >> A[i] >> B[i]; }
    i = 0;
    int sum, digit;
    while(A[i] >= 0){
        sum = A[i] + B[i];
        while(digit){
            sum /= 10;
            digit++;
        };
        cout << digit << endl;
    };
    return 0;
}
        

