#include<iostream>
#include<iomanip>
#include<string>
#include<algorithm>
#include<cmath>
using namespace std;

int main(){
    int a,b,s;
    while(cin>>a>>b){
        s=a+b;
        if(s<10){
            cout<<"1"<<endl;
        }else if(s<100){
            cout<<"2"<<endl;
        }else if(s<1000){
            cout<<"3"<<endl;
        }else if(s<10000){
            cout<<"4"<<endl;
        }else if(s<100000){
            cout<<"5"<<endl;
        }else if(s<1000000){
            cout<<"6"<<endl;
        }else{
            cout<<"7"<<endl;
        }
    }
    return 0;
}