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

int main(){
    vector<int> a(3),b(3);
    for(int i=0;i<3;i++){
        cin >> a[i];
        cin >> b[i];
    }
    for(int i=0;i<3;i++){
        int c = 1;
        int s = a[i] + b[i];
        while(s >= 10){
            s /= 10;
            c++;
        }
        cout << c << endl;
    }
}