#include<iostream>
#include<string>
#include<sstream>

using namespace std;

typedef long long int lint;

int main(int argc,char** args){

    lint n1;
    lint n2;

    cin>>n1;

    while(!cin.eof()){
        cin>>n2;

        lint sum=n1+n2;

        ostringstream temp;
        temp<<sum;

        string instr=temp.str();
        cout<<instr.length()<<endl;

        cin>>n1;
    }
    

    /* Lets try straight forward way first.
    string s1;
    string s2;

    cin>>s1;
    while(!cin.eof()){
        cin>>s2;
        
        int d1=s1[0];
        int d2=s2[0];

        //lets make sure s1 length is hight or equal
        if(s1.length() < s2.length*(){
            string swit=s2;
            s2=s1;
            s1=s2;
        }

        if(s1
        //if it the last digit, the for sure.
        if(d1+d2>9){

        }



        cin>>s1;
    }

    */

}