#include <iostream>
using namespace std;
int main(void){
    int a,b,c;
    while (cin >>a>>b){
    
    c=a+b;
    
    if(c<10) cout << "1" <<endl;
    else if (c<100) cout << "2" <<endl;
    else if (c<1000) cout << "3" <<endl;
    else if (c<10000) cout <<"4" <<endl;
    else if (c<100000) cout<<"5" <<endl;
    else if (c<1000000) cout <<"6"<<endl;
    else cout <<"7" <<endl;
    
    }
    
}
    
    
    

