#include<iostream>
#include<string>
using namespace std;
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int x,y;
    for(;;){
        cin >> x >> y;
        if(cin.eof())   break;
        cout << to_string(x+y).length() << "\n";
    }
}
template < typename T > std::string to_string( const T& n ){
    std::ostringstream stm ;
    stm << n ;
    return stm.str() ;
}