#include <iostream>
#include <sstream>      // std::ostringstream
using namespace std;
    template < typename T > std::string to_string( const T& n )
    {
        std::ostringstream stm ;
        stm << n ;
        return stm.str() ;
    }

int i,a,b;
string s;

int main() {
	while(cin>>a>>b){
		a = a+b;
		s = to_string(a);
		cout << s.size() << endl;
	}
	return 0;
}