#include "bits/stdc++.h"
using namespace std;
int main(){
    int a, b;
    string sum;
    while(cin >> a >> b){
        sum = to_string(a + b);
        cout << sum.size() << endl;
    }     
    return 0;
}