#include <iostream>
#include <sstream>
using namespace std;

int main(){
    int a, b;
    stringstream ss;
    string s;

    while(cin >> a >> b){
        ss.clear();
        ss.str("");
        ss << a + b;
        s = ss.str();
        cout << s.length() << endl;
    }
    return 0;

}