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

#include <string>
#include <sstream>

namespace patch
{
    template < typename T > std::string to_string( const T& n )
    {
        std::ostringstream stm ;
        stm << n ;
        return stm.str() ;
    }
}

#include <iostream>
int main(){
	int i,j;
	string s;
while(cin>>i>>j){
	cout<<patch::to_string(i+j).length()<<endl;
}
    return 0;
}