#include<iostream>
#include<algorithm>
#include<vector>
#include<cmath>
using namespace std;

int main(){
    int a,b, sum;
    while(cin >> a >> b){
        //int sum = a+b;
        //double result = ceil(log10(sum+1));
        cout << to_string(a+b).length() << endl;
    }
    return 0;
}
