#include <iostream>
using namespace std;
int main(void){
    int a, b, sum;
    
    while(true){
        cin >> a >> b;
        if(cin.fail()) break;
        
        sum = a + b;
        
        if(sum / 10 != 0 && sum / 100 == 0)
            cout << 2 << endl;
        else if(sum / 100 != 0 && sum / 1000 == 0)
            cout << 3 << endl;
        else if(sum / 1000 != 0 && sum / 10000 == 0)
            cout << 4 << endl;
        else if(sum / 10000 != 0 && sum / 100000 == 0)
            cout << 5 << endl;
        else if(sum / 100000 != 0 && sum / 1000000 == 0)
            cout << 6 << endl;
        else 
            cout << 7 << endl;
    }
}

