#include<iostream>
using namespace std;
int main(){
    int a[200],b[200];
    int i = 0;
    while(cin){
        cin >> a[i] >> b[i];
        i++;
    }
    for(int j=0; j < i-1; j++ ){
        int c = a[j] + b[j];
        int count = 0;
        while(c > 0){
            c = c  / 10;
            count++;
        }
        cout << count << endl;
    }
    return 0;
}
