#include<iostream>
using namespace std;
int main(){
    int a,b,work;
    int count = 1;
    while(cin >> a >> b){
        work = a + b;
        while(work != 0){
            if(work / 10 != 0){
                 count++;
            }else{
                cout << count << endl;
            }
            count = 1;
        }
    }
    return 0;
}